code: def parse_current_ratings_data(
      dir_path: str,
  ) -> Iterator[Tuple[int, Dict[str, Any]]]:
      """Parses the ratings data in current format (20m, 25m, and latest-small)."""
      movie_info_map = {}
      for _, movie_example in parse_current_movies_data(dir_path):
          movie_info_map[movie_example["movie_id"]] = movie_example
  
      ratings_file_path = os.path.join(dir_path, "ratings.csv")
      with epath.Path(ratings_file_path).open() as ratings_file:
          ratings_reader = csv.DictReader(ratings_file)
          for row_num, row in enumerate(ratings_reader):
              ex = {
                  "user_id": row["userId"],
                  "user_rating": row["rating"],
                  "timestamp": row["timestamp"],
              }
              ex.update(movie_info_map[row["movieId"]])
              yield row_num, ex
  
file_path: datasets/tensorflow_datasets/structured/movielens_parsing.py
imports: import codecs
  import csv
  import os
  from typing import Any, Dict, Iterator, Tuple
  from etils import epath
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: parse_current_ratings_data(dir_path) without return types