I have created a model which is a knowledge graph based recommender system and have stored similarity between nodes in a dictionary. Then I have created a simple function, where