code: def _auto_detect_engine(model_id: str, hf_hub_token: str) -> tuple:
      """Placeholder docstring"""
      try:
          hf_model_config = _get_model_config_properties_from_hf(
              model_id, hf_hub_token
          )
          model_type = hf_model_config.get("model_type")
  
          if len(model_type) < 1:
              logger.warning(
                  "Unable to detect the model architecture from provided model_id %s.\
              Defaulting to HuggingFaceAccelerate."
                  % model_id
              )
              engine = _DjlEngine.HUGGINGFACE_ACCELERATE
          elif (
              model_type in defaults.DEEPSPEED_RECOMMENDED_ARCHITECTURES
          ):
              logger.info(
                  "Model architecture %s is recommended to be run on DeepSpeed."
                  % model_type
              )
              engine = _DjlEngine.DEEPSPEED
          elif (
              model_type
              in defaults.FASTER_TRANSFORMER_RECOMMENDED_ARCHITECTURES
          ):
              logger.info(
                  "Model architecture %s is recommended to be run on FasterTransformer."
                  % model_type
              )
              engine = _DjlEngine.FASTER_TRANSFORMER
          else:
              logger.info(
                  "Model architecture %s does not have a recommended engine. Defaulting to HuggingFaceAccelerate."
                  % model_type
              )
              engine = _DjlEngine.HUGGINGFACE_ACCELERATE
      except HTTPError as e:
          raise ValueError(
              "The provided HuggingFace Model ID could not be accessed from HuggingFace Hub. %s",
              str(e),
          )
      except ValueError as e:
          raise e
      except Exception as e:
          logger.warning(
              "Unable to detect the model's architecture: %s. Defaulting to HuggingFaceAccelerate."
              % str(e)
          )
          engine = _DjlEngine.HUGGINGFACE_ACCELERATE
  
      return (engine, hf_model_config)
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/model_server/djl_serving/utils.py
imports: from __future__ import absolute_import
  from urllib.error import HTTPError
  import math
  import logging
  from sagemaker.serve.utils.types import _DjlEngine
  from sagemaker.djl_inference import defaults
  from sagemaker.djl_inference.model import _get_model_config_properties_from_hf
  from sagemaker.serve.utils.local_hardware import _get_available_gpus
  from sagemaker.serve.builder.schema_builder import SchemaBuilder
label_desc: Use image node_id 1 for calling a global function with example usage: _auto_detect_engine(model_id, hf_hub_token) and returns: engine,  hf_model_config