code: def get_movie_lens(output_dir, overwrite: bool = False):
      """Download public Movie Lens dataset.
  
      Notes
      -----
      The download is about 6M.
  
      See the
      `MovieLens website <https://grouplens.org/datasets/movielens/100k/>`__
      for more information about this dataset.
  
      Parameters
      ----------
      output_dir
          Directory in which to write data.
      overwrite
          If ``True``, overwrite existing files/directories at those locations.
      """
      fs = Env.fs()
  
      if not _dir_exists(fs, output_dir):
          fs.mkdir(output_dir)
  
      paths = [
          os.path.join(output_dir, x)
          for x in ["movies.ht", "ratings.ht", "users.ht"]
      ]
      if overwrite or any(not _dir_exists(fs, f) for f in paths):
          init_temp_dir()
          source = resources["movie_lens_100k"]
          tmp_path = os.path.join(tmp_dir, "ml-100k.zip")
          info(
              f"downloading MovieLens-100k data ...\n"
              f"  Source: {source}"
          )
          sync_retry_transient_errors(urlretrieve, source, tmp_path)
          with zipfile.ZipFile(tmp_path, "r") as z:
              z.extractall(tmp_dir)
  
          user_table_path = os.path.join(tmp_dir, "ml-100k", "u.user")
          movie_table_path = os.path.join(tmp_dir, "ml-100k", "u.item")
          ratings_table_path = os.path.join(
              tmp_dir, "ml-100k", "u.data"
          )
          assert os.path.exists(user_table_path)
          assert os.path.exists(movie_table_path)
          assert os.path.exists(ratings_table_path)
  
          user_cluster_readable = _copy_to_tmp(
              fs, local_path_uri(user_table_path), extension="txt"
          )
          movie_cluster_readable = _copy_to_tmp(
              fs, local_path_uri(movie_table_path), "txt"
          )
          ratings_cluster_readable = _copy_to_tmp(
              fs, local_path_uri(ratings_table_path), "txt"
          )
  
          [movies_path, ratings_path, users_path] = paths
  
          genres = [
              "Action",
              "Adventure",
              "Animation",
              "Children's",
              "Comedy",
              "Crime",
              "Documentary",
              "Drama",
              "Fantasy",
              "Film-Noir",
              "Horror",
              "Musical",
              "Mystery",
              "Romance",
              "Sci-Fi",
              "Thriller",
              "War",
              "Western",
          ]
  
          # utility functions for importing movies
          def field_to_array(ds, field):
              return hl.if_else(
                  ds[field] != 0,
                  hl.array([field]),
                  hl.empty_array(hl.tstr),
              )
  
          def fields_to_array(ds, fields):
              return hl.flatten(
                  hl.array([field_to_array(ds, f) for f in fields])
              )
  
          def rename_columns(ht, new_names):
              return ht.rename(
                  {k: v for k, v in zip(ht.row, new_names)}
              )
  
          info(f"importing users table and writing to {users_path} ...")
  
          users = rename_columns(
              hl.import_table(
                  user_cluster_readable,
                  key=["f0"],
                  no_header=True,
                  impute=True,
                  delimiter="|",
              ),
              ["id", "age", "sex", "occupation", "zipcode"],
          )
          users.write(users_path, overwrite=True)
  
          info(
              f"importing movies table and writing to {movies_path} ..."
          )
  
          movies = hl.import_table(
              movie_cluster_readable,
              key=["f0"],
              no_header=True,
              impute=True,
              delimiter="|",
          )
          movies = rename_columns(
              movies,
              [
                  "id",
                  "title",
                  "release date",
                  "video release date",
                  "IMDb URL",
                  "unknown",
              ]
              + genres,
          )
          movies = movies.drop(
              "release date",
              "video release date",
              "unknown",
              "IMDb URL",
          )
          movies = movies.transmute(
              genres=fields_to_array(movies, genres)
          )
          movies.write(movies_path, overwrite=True)
  
          info(
              f"importing ratings table and writing to {ratings_path} ..."
          )
  
          ratings = hl.import_table(
              ratings_cluster_readable, no_header=True, impute=True
          )
          ratings = rename_columns(
              ratings, ["user_id", "movie_id", "rating", "timestamp"]
          )
          ratings = ratings.drop("timestamp")
          ratings.write(ratings_path, overwrite=True)
  
      else:
          info("Movie Lens files found!")
  
file_path: hail/hail/python/hail/utils/tutorial.py
imports: import hail
  from .java import Env, info
  from .misc import new_temp_file, local_path_uri, new_local_temp_dir
  import os
  import zipfile
  from urllib.request import urlretrieve
  from hailtop.utils import sync_retry_transient_errors
label_desc: Use image node_id 7 for calling a global function with example usage: get_movie_lens(output_dir, overwrite) and returns: hl, hl, ht