code: def get_movielens(variant="20m"):
      """Gets movielens datasets
  
      Parameters
      ---------
      variant : string
          Which version of the movielens dataset to download. Should be one of '20m', '10m',
          '1m' or '100k'.
  
      Returns
      -------
      movies : ndarray
          An array of the movie titles.
      ratings : csr_matrix
          A sparse matrix where the row is the movieId, the column is the userId and the value is
          the rating.
      """
      filename = f"movielens_{variant}.hdf5"
  
      path = os.path.join(_download.LOCAL_CACHE_DIR, filename)
      if not os.path.isfile(path):
          log.info("Downloading dataset to '%s'", path)
          _download.download_file(URL_BASE + filename, path)
      else:
          log.info("Using cached dataset at '%s'", path)
  
      with h5py.File(path, "r") as f:
          m = f.get("movie_user_ratings")
          plays = csr_matrix(
              (m.get("data"), m.get("indices"), m.get("indptr"))
          )
          return np.array(f["movie"].asstr()[:]), plays
  
file_path: implicit/implicit/datasets/movielens.py
imports: import logging
  import os
  import h5py
  import numpy
  from scipy.sparse import coo_matrix, csr_matrix
  from implicit.datasets import _download
label_desc: Use image node_id 1 for calling a global function with example usage: get_movielens(variant) and returns: np,  plays