code: def _get_normalized_distribution(distribution, key_names):
      total_count = sum(distribution.values())
      normalized_dist = []
      for label in key_names:
          if label in distribution.keys():
              normalized_dist.append(distribution[label] / total_count)
          else:
              normalized_dist.append(0.0)
      return normalized_dist
  
file_path: contextual-ai/xai/recommendations/recommendation.py
imports: import xai.constants
  from sklearn.metrics.pairwise import cosine_similarity
  import math
label_desc: Use image node_id 2 for calling a global function with example usage: _get_normalized_distribution(distribution, key_names) and returns: normalized_dist