code: def get_image_name(uses: str) -> str:
      """The image can be provided in different formats by the user.
      This function converts it to an image name which can be understood by k8s.
      It uses the Hub api to get the image name and the latest tag on Docker Hub.
  
      If you don't want to rebuild image on Jina Hub,
      you can set `JINA_HUB_NO_IMAGE_REBUILD` environment variable.
  
      :param uses: image name
  
      :return: normalized image name
      """
      try:
          rebuild_image = "JINA_HUB_NO_IMAGE_REBUILD" not in os.environ
          scheme, name, tag, secret = parse_hub_uri(uses)
          meta_data, _ = HubIO.fetch_meta(
              name,
              tag,
              secret=secret,
              rebuild_image=rebuild_image,
              force=True,
          )
          image_name = meta_data.image_name
          return image_name
      except Exception:
          if uses.startswith("docker"):
              # docker:// is a valid requirement and user may want to put its own image
              return uses.replace("docker://", "")
          raise
  
file_path: jina/jina/orchestrate/deployments/config/helper.py
imports: import os
  from typing import Dict, Optional
  from hubble.executor.helper import is_valid_docker_uri, parse_hub_uri
  from hubble.executor.hubio import HubIO
  from jina.constants import __default_composite_gateway__, __default_executor__, __default_grpc_gateway__, __default_http_gateway__, __default_websocket_gateway__, __dynamic_base_gateway_hubble__
  from jina.enums import PodRoleType
label_desc: Use image node_id 2 for calling a global function with example usage: get_image_name(uses) and returns: image_name, uses