code: def download_pretrained_models(
      models_root_dir="/tmp/sketch_rnn/models",
      pretrained_models_url=PRETRAINED_MODELS_URL,
  ):
      """Download pretrained models to a temporary directory."""
      tf.gfile.MakeDirs(models_root_dir)
      zip_path = os.path.join(
          models_root_dir, os.path.basename(pretrained_models_url)
      )
      if os.path.isfile(zip_path):
          tf.logging.info(
              "%s already exists, using cached copy", zip_path
          )
      else:
          tf.logging.info(
              "Downloading pretrained models from %s...",
              pretrained_models_url,
          )
          urlretrieve(pretrained_models_url, zip_path)
          tf.logging.info("Download complete.")
      tf.logging.info("Unzipping %s...", zip_path)
      with zipfile.ZipFile(zip_path) as models_zip:
          models_zip.extractall(models_root_dir)
      tf.logging.info("Unzipping complete.")
  
imports: import json
  import os
  import time
  import zipfile
  from magenta.models.sketch_rnn import model
  from magenta.models.sketch_rnn import utils
  import numpy
  import requests
  import six
  from six.moves.urllib.request import urlretrieve
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling a global function with example usage: download_pretrained_models(models_root_dir, pretrained_models_url) without return types