code: def load_movielens():
      """Loads MovieLens 1M as from https://grouplens.org/datasets/movielens/1m."""
      data = pd.read_csv(
          "ratings.dat",
          sep="::",
          header=None,
          names=["userId", "movieId", "rating", "timestamp"],
      )
      n_users = len(set(data["userId"]))
      n_movies = len(set(data["movieId"]))
      print("number of movie: ", n_movies)
      print("number of user: ", n_users)
  
      # give unique dense movie index to movieId
      data["movieIndex"] = stats.rankdata(
          data["movieId"], method="dense"
      )
      # minus one to reduce the minimum value to 0, which is the start of col index
  
      print("number of ratings:", data.shape[0])
      print(
          "percentage of sparsity:",
          (1 - data.shape[0] / n_users / n_movies) * 100,
          "%",
      )
  
      train, test = train_test_split(
          data, test_size=0.2, random_state=100
      )
  
      return train.values - 1, test.values - 1, np.mean(train["rating"])
  
file_path: privacy/tutorials/movielens_tutorial.py
imports: from absl import app
  from absl import flags
  import numpy
  import pandas
  from scipy import stats
  from sklearn.model_selection import train_test_split
  import tensorflow
  from tensorflow import estimator
  from tensorflow.compat.v1 import estimator
  from tensorflow_privacy.privacy.analysis.gdp_accountant import compute_eps_poisson
  from tensorflow_privacy.privacy.analysis.gdp_accountant import compute_mu_poisson
  from tensorflow_privacy.privacy.optimizers import dp_optimizer
label_desc: Use image node_id 2 for calling a global function with example usage: load_movielens() and returns: unknown,  unknown,  np