code: def download_or_get_file(file, sha256_checksum, output_file):
      if file.startswith("http://") or file.startswith("https://"):
          if (
              not os.path.exists(output_file)
              or file_checksum(output_file) != sha256_checksum
          ):
              MaceLogger.info(
                  "Downloading file %s to %s, please wait ..."
                  % (file, output_file)
              )
              if sys.version_info >= (3, 0):
                  import urllib.request
  
                  data = urllib.request.urlopen(file)
                  out_handle = open(output_file, "wb")
                  out_handle.write(data.read())
                  out_handle.close()
              else:
                  import urllib
  
                  urllib.urlretrieve(file, output_file)
              MaceLogger.info("Model downloaded successfully.")
      else:
          shutil.copyfile(file, output_file)
  
      if sha256_checksum:
          mace_check(
              file_checksum(output_file) == sha256_checksum,
              "checksum validate failed",
          )
  
      return output_file
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import inspect
  import hashlib
  import filelock
  import errno
  import os
  import sys
  import shutil
  import traceback
label_desc: Use image node_id 5 for calling a global function with example usage: download_or_get_file(file, sha256_checksum, output_file) and returns: output_file