code: def movielens_20m(
      root: str,
      *,
      include_movies_data: bool = False,
      # pyre-ignore[2]
      row_mapper: Optional[
          Callable[[List[str]], Any]
      ] = _default_row_mapper,
      # pyre-ignore[2]
      **open_kw,
  ) -> IterDataPipe:
      """`MovieLens 20M <https://grouplens.org/datasets/movielens/20m/>`_ Dataset
      Args:
          root (str): local path to root directory containing MovieLens 20M dataset files.
          include_movies_data (bool): if True, adds movies data to each line.
          row_mapper (Optional[Callable[[List[str]], Any]]): function to apply to each split line.
          open_kw: options to pass to underlying invocation of iopath.common.file_io.PathManager.open.
  
      Example::
  
          datapipe = movielens_20m("/home/datasets/ml-20")
          datapipe = dp.iter.Batch(datapipe, 100)
          datapipe = dp.iter.Collate(datapipe)
          batch = next(iter(datapipe))
      """
      return _movielens(
          root,
          include_movies_data=include_movies_data,
          row_mapper=row_mapper,
          **open_kw,
      )
  
file_path: torchrec/torchrec/datasets/movielens.py
imports: import os
  from typing import Any, Callable, Dict, List, Optional, Union
  from torch.utils.data import IterDataPipe
  from torchrec.datasets.utils import LoadFiles, ReadLinesFromCSV, safe_cast
label_desc: Use image node_id 4 for calling a global function with example usage: movielens_20m(root) and returns: _movielens