code: def load_pretrained_hf_model_from_hub(
      model_class: Type,
      pretrained_model_name_or_path: Optional[Union[str, PathLike]],
      **pretrained_kwargs,
  ) -> PreTrainedModel:
      """Download a HuggingFace model.
  
      Downloads a model from the HuggingFace zoo with retry on failure.
      Args:
          model_class: Class of the model to download.
          pretrained_model_name_or_path: Name of the model to download.
          pretrained_kwargs: Additional arguments to pass to the model constructor.
      Returns:
          The pretrained model object.
      """
      return model_class.from_pretrained(
          pretrained_model_name_or_path, **pretrained_kwargs
      )
  
file_path: ludwig/ludwig/utils/hf_utils.py
imports: import logging
  import os
  import tempfile
  from os import PathLike
  from typing import Optional, Tuple, Type, Union
  from transformers import AutoTokenizer, PreTrainedModel
  from transformers.tokenization_utils import PreTrainedTokenizer
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.utils.error_handling_utils import default_retry
  from ludwig.utils.fs_utils import download, path_exists
  from ludwig.utils.upload_utils import hf_hub_login
label_desc: Use image node_id 1 for calling a global function with example usage: load_pretrained_hf_model_from_hub(model_class, pretrained_model_name_or_path) and returns: model_class