code: def fetch_ml(name: str, base_dir: Path):
      """
      Fetch a MovieLens dataset.  The followings names are recognized:
  
      . ml-100k
      . ml-1m
      . ml-10m
      . ml-20m
      . ml-25m
      . ml-latest
      . ml-latest-small
  
      Args:
          name:
              The name of the dataset.
          base_dir:
              The base directory into which data should be extracted.
      """
      zipname = f"{name}.zip"
      zipfile = base_dir / zipname
      zipurl = ML_LOC + zipname
  
      test_file = base_dir / ML_DATASETS[name]
      if test_file.exists():
          _log.info(test_file, "already exists")
          return
  
      _log.info("downloading data set %s", name)
      with zipfile.open("wb") as zf:
          res = urlopen(zipurl)
          block = res.read(8 * 1024 * 1024)
          while len(block):
              _log.debug("received %d bytes", len(block))
              zf.write(block)
              block = res.read(8 * 1024 * 1024)
  
      _log.info("unpacking data set")
      with ZipFile(zipfile, "r") as zf:
          zf.extractall(base_dir)
  
file_path: lkpy/lenskit/datasets/fetch.py
imports: import sys
  from zipfile import ZipFile
  from urllib.request import urlopen
  import argparse
  from pathlib import Path
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: fetch_ml(name, base_dir) without return types