code: def test_get_image_name(mocker, monkeypatch, uses):
      mock = mocker.Mock()
  
      def _mock_fetch(
          name,
          *args,
          **kwargs,
      ):
          mock(
              name=name,
              rebuild_image=kwargs.get(
                  "rebuild_image", args[2] if len(args) >= 3 else True
              ),
          )
          return (
              HubExecutor(
                  uuid="hello",
                  name=name,
                  tag="v0",
                  image_name=f"jinahub/{name}",
                  md5sum=None,
                  visibility=True,
                  archive_url=None,
              ),
              False,
          )
  
      monkeypatch.setattr(HubIO, "fetch_meta", _mock_fetch)
  
      image_name = get_image_name(uses)
  
      assert image_name in {
          "jinahub/DummyExecutor",
          "jinahub/jina-ai/DummyExecutor",
      }
  
      _, mock_kwargs = mock.call_args_list[0]
      assert (
          mock_kwargs["rebuild_image"] is True
      )  # default value must be True
  
      os.environ["JINA_HUB_NO_IMAGE_REBUILD"] = "1"
  
      get_image_name(uses)
  
      del os.environ["JINA_HUB_NO_IMAGE_REBUILD"]
  
      _, mock_kwargs = mock.call_args_list[1]
      assert mock_kwargs["rebuild_image"] is False
  
file_path: jina/tests/unit/orchestrate/deployments/config/test_helper.py
imports: import json
  import os
  import pytest
  from hubble.executor import HubExecutor
  from hubble.executor.hubio import HubIO
  from jina import __version__
  from jina.orchestrate.deployments.config.helper import get_base_executor_version, get_image_name, to_compatible_name
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_image_name(mocker, monkeypatch, uses) and returns: HubExecutor,  False