input: Write a python function to calculate the genre similarity between movies based on their genres.
  assert 'similar_movies' in metadata.columns
  assert len(metadata['sim_movies'][0]) <= 20
output: def genre_similarity(movie_genres1, movie_genres2):
      set1 = set(movie_genres1)
      set2 = set(movie_genres2)
      intersection = set1.intersection(set2)
      union = set1.union(set2)
      if not union:
          return 0.0
      return len(intersection) / len(union)
  
  def similar_movies(metadata):
      metadata['sim_movies'] = metadata.apply(
          lambda row: sorted(
              metadata['id'].tolist(),
              key=lambda x: -genre_similarity(row['genres'], metadata.loc[metadata['id'] == x, 'genres'].values[0])
          )[1:21],
          axis=1
      )