code: def load(location, digest=None):
      """
      Utility function used to load arbitrary Hummingbird models.
  
      Args:
          location: The location of the model.
          digest (optional): A digest string to verify the model integrity (created during save).
      """
      # Add load capabilities.
      from hummingbird.ml.containers import PyTorchSklearnContainer
      from hummingbird.ml.containers import TVMSklearnContainer
      from hummingbird.ml.containers import ONNXSklearnContainer
      from hummingbird.ml.operator_converters import constants
      import hmac
      import hashlib
  
      model = None
      model_type = None
  
      # Unzip the dir.
      zip_location = location
      if not location.endswith("zip"):
          zip_location = location + ".zip"
      else:
          location = zip_location[:-4]
      assert os.path.exists(
          zip_location
      ), "Zip file {} does not exist.".format(zip_location)
  
      # Verify the digest if provided.
      if digest is None:
          print(
              "Warning: No digest provided. Model integrity not verified."
          )
      else:
          with open(zip_location, "rb") as file:
              new_digest = hmac.new(
                  b"shared-key", file.read(), hashlib.sha1
              ).hexdigest()
              if digest != new_digest:
                  raise RuntimeError("Integrity check failed")
  
      shutil.unpack_archive(zip_location, location, format="zip")
  
      assert os.path.exists(
          location
      ), "Model location {} does not exist.".format(location)
  
      # Load the model type.
      with open(
          os.path.join(location, constants.SAVE_LOAD_MODEL_TYPE_PATH),
          "r",
      ) as file:
          model_type = file.readline()
  
      if "torch" in model_type:
          model = PyTorchSklearnContainer.load(
              location,
              do_unzip_and_model_type_check=False,
              digest=digest,
          )
      elif "onnx" in model_type:
          model = ONNXSklearnContainer.load(
              location,
              do_unzip_and_model_type_check=False,
              digest=digest,
          )
      elif "tvm" in model_type:
          model = TVMSklearnContainer.load(
              location,
              do_unzip_and_model_type_check=False,
              digest=digest,
          )
      else:
          shutil.rmtree(location)
          raise RuntimeError(
              "Model type {} not recognized.".format(model_type)
          )
  
      assert model.model is not None
      return model
  
imports: from packaging.version import Version, parse
  from types import ModuleType
  import numpy
  import torch
  import os
  import warnings
  import shutil
  from hummingbird.ml.exceptions import ConstantError
label_desc: Use image node_id 24 for calling a global function with example usage: load(location, digest) and returns: model