This is not very hard to do but I had a tough time figuring out how to get this to work. I’m just writing this down in case someone finds it helpful. In…