def get_topic_similarity(topic_1, topic_2):
 if ((topic_1 in RECOMMENDATION_CATEGORIES) and (topic_2 in RECOMMENDATION_CATEGORIES)):
  topic_similarities = get_topic_similarities_dict()
  return topic_similarities[topic_1][topic_2]
 elif (topic_1 == topic_2):
  return feconf.SAME_TOPIC_SIMILARITY
 else:
  return feconf.DEFAULT_TOPIC_SIMILARITY

def get_topic_similarity ( topic_1 , topic_2 ) : if ( ( topic_1 in RECOMMENDATION_CATEGORIES ) and ( topic_2 in RECOMMENDATION_CATEGORIES ) ) : topic_similarities = get_topic_similarities_dict ( ) return topic_similarities [ topic_1 ] [ topic_2 ] elif ( topic_1 == topic_2 ) : return feconf . SAME_TOPIC_SIMILARITY else : return feconf . DEFAULT_TOPIC_SIMILARITY
gets the similarity between two topics .