code: def _get_model_directory(model_name, create_directory=True):
      """Gets the path to the directory of given model.
  
      The generated path is just a concatenation of the global root directory
      and the model name. This function forked from Chainer, an MIT-licensed project,
      https://github.com/chainer/chainer/blob/v7.4.0/chainer/dataset/download.py#L43
      Args:
          model_name (str): Name of the model.
          create_directory (bool): If True (default), this function also creates
              the directory at the first time. If the directory already exists,
              then this option is ignored.
      Returns:
          str: Path to the dataset directory.
      """
      path = os.path.join(_models_root, model_name)
      if create_directory:
          try:
              os.makedirs(path)
          except OSError:
              if not os.path.isdir(path):
                  raise
      return path
  
file_path: pfrl/pfrl/utils/pretrained_models.py
imports: import hashlib
  import os
  import posixpath
  import shutil
  import sys
  import tempfile
  import time
  import urllib
  import zipfile
  import filelock
label_desc: Use image node_id 1 for calling a global function with example usage: _get_model_directory(model_name, create_directory) and returns: path