Greetings! So I wrote this function and then felt like sharing it with you guys. Which basically helps you retrieve a…