code: def get_hypermodel(hypermodel):
      """Gets a HyperModel from a HyperModel or callable."""
      if hypermodel is None:
          return None
  
      if isinstance(hypermodel, HyperModel):
          return hypermodel
  
      if not callable(hypermodel):
          raise errors.FatalValueError(
              "The `hypermodel` argument should be either "
              "a callable with signature `build(hp)` returning a model, "
              "or an instance of `HyperModel`."
          )
      return DefaultHyperModel(hypermodel)
  
file_path: keras-tuner/keras_tuner/engine/hypermodel.py
imports: from keras_tuner import errors
  from keras_tuner.api_export import keras_tuner_export
label_desc: Use image node_id 1 for calling a global function with example usage: get_hypermodel(hypermodel) and returns: DefaultHyperModel, None, hypermodel