Can someone please tell me that why is my function returning None?

https://colab.research.google.com/drive/1_YAiPk6uE574pPJp5OHHY428qXBF6uj2