Pocket FM interview question

Shared codeshare link with python code and asked to refactor the code