code: def push_to_hf_hub(
      repo: str,
      name: str,
      bundle_dir: str,
      token: str | None = None,
      private: bool | None = True,
      version: str | None = None,
      tag_as_latest_version: bool | None = False,
      **upload_folder_kwargs: Any,
  ) -> Any:
      """
      Push a MONAI bundle to the Hugging Face Hub.
  
      Typical usage examples:
  
      .. code-block:: bash
  
          python -m monai.bundle push_to_hf_hub --repo <HF repository id> --name <bundle name> \
              --bundle_dir <bundle directory> --version <version> ...
  
      Args:
          repo: namespace (user or organization) and a repo name separated by a /, e.g. `hf_username/bundle_name`
          bundle_name: name of the bundle directory to push.
          bundle_dir: path to the bundle directory.
          token: Hugging Face authentication token. Default is `None` (will default to the stored token).
          private: Private visibility of the repository on Hugging Face. Default is `True`.
          version_name: Name of the version tag to create. Default is `None` (no version tag is created).
          tag_as_latest_version: Whether to tag the commit as `latest_version`.
              This version will downloaded by default when using `bundle.download()`. Default is `False`.
          upload_folder_kwargs: Keyword arguments to pass to `HfApi.upload_folder`.
  
      Returns:
          repo_url: URL of the Hugging Face repo
      """
      # Connect to API and create repo
      hf_api = huggingface_hub.HfApi(token=token)
      hf_api.create_repo(repo_id=repo, private=private, exist_ok=True)
  
      # Create model card in bundle directory
      new_modelcard_path = os.path.join(bundle_dir, name, "README.md")
      modelcard_path = os.path.join(
          bundle_dir, name, "docs", "README.md"
      )
      if os.path.exists(modelcard_path):
          # Copy README from old path if it exists
          copyfile(modelcard_path, new_modelcard_path)
          _add_model_card_metadata(new_modelcard_path)
  
      # Upload bundle folder to repo
      repo_url = hf_api.upload_folder(
          repo_id=repo,
          folder_path=os.path.join(bundle_dir, name),
          **upload_folder_kwargs,
      )
  
      # Create version tag if specified
      if version is not None:
          hf_api.create_tag(repo_id=repo, tag=version, exist_ok=True)
  
      # Optionally tag as `latest_version`
      if tag_as_latest_version:
          hf_api.create_tag(
              repo_id=repo, tag="latest_version", exist_ok=True
          )
  
      return repo_url
  
imports: from __future__ import annotations
  import ast
  import json
  import os
  import re
  import warnings
  from collections.abc import Mapping, Sequence
  from pathlib import Path
  from pydoc import locate
  from shutil import copyfile
  from textwrap import dedent
  from typing import Any, Callable
  import torch
  from torch.cuda import is_available
  from monai.apps.mmars.mmars import _get_all_ngc_models
  from monai.apps.utils import _basename, download_url, extractall, get_logger
  from monai.bundle.config_item import ConfigComponent
  from monai.bundle.config_parser import ConfigParser
  from monai.bundle.utils import DEFAULT_INFERENCE, DEFAULT_METADATA
  from monai.bundle.workflows import BundleWorkflow, ConfigWorkflow
  from monai.config import IgniteInfo, PathLike
  from monai.data import load_net_with_metadata, save_net_with_metadata
  from monai.networks import convert_to_onnx, convert_to_torchscript, convert_to_trt, copy_model_state, get_state_dict, save_state
  from monai.utils import check_parent_dir, deprecated_arg, ensure_tuple, get_equivalent_dtype, min_version, optional_import, pprint_edges
label_desc: Use image node_id 35 for calling a global function with example usage: push_to_hf_hub(repo, name, bundle_dir, token, private, version, tag_as_latest_version) and returns: repo_url