code: def make_file_paths_local(paths, local_directory):
      """Makes sure that given files are locally available.
  
      If a Cloud Storage path is provided, downloads the file and returns the new
      path relative to local_directory. If a local path is provided it is returns
      path with no modification.
  
      Args:
        paths: Single path or a list of paths.
        local_directory: Local path to the directory were downloaded files will be
          stored. Note that if you want to download gin configuration files
  
      Returns:
        Single local path or a list of local paths.
      """
      if isinstance(paths, str):
          if re.match("gs://*", paths):
              local_name = os.path.basename(paths)
              download_from_gstorage(
                  paths, os.path.join(local_directory, local_name)
              )
              return local_name
          else:
              return paths
      else:
          local_paths = []
          for path in paths:
              if re.match("gs://*", path):
                  local_name = os.path.basename(path)
                  download_from_gstorage(
                      path, os.path.join(local_directory, local_name)
                  )
                  local_paths.append(local_name)
              else:
                  local_paths.append(path)
          return local_paths
  
file_path: ddsp/ddsp/training/cloud.py
imports: import os
  import re
  from absl import logging
  from google.cloud import storage
  import hypertune
label_desc: Use image node_id 2 for calling a global function with example usage: make_file_paths_local(paths, local_directory) and returns: local_paths, local_name, paths