code: def _get_cache_dir(_type="model"):
      cache_dir = _tc.config.get_runtime_config()[
          "TURI_CACHE_FILE_LOCATIONS"
      ]
      if _type == "model":
          download_path = _os.path.join(cache_dir, "model_cache")
      else:
          download_path = _os.path.join(cache_dir, "data_cache")
  
      if not _os.path.exists(download_path):
          try:
              _os.makedirs(download_path)
          except:
              raise RuntimeError(
                  'Could not write to the turicreate file cache, which is currently set to "{cache_dir}".\n'
                  "To continue you must update this location to a writable path by calling:\n"
                  "\ttc.config.set_runtime_config('TURI_CACHE_FILE_LOCATIONS', <path>)\n"
                  "Where <path> is a writable file path that exists.".format(
                      cache_dir=cache_dir
                  )
              )
  
      return download_path
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import os
  import sys
  import requests
  import turicreate
  import hashlib
  from six.moves.urllib import parse
label_desc: Use image node_id 1 for calling a global function with example usage: _get_cache_dir(_type) and returns: download_path