code: def test_get_docker_image_with_custom_image_uri(
      self, mock_api_client, mock_logger
  ):
      self.setup()
  
      # Verify mocking is correct and mock img tag.
      assert mock_api_client is docker.APIClient
      assert mock_logger is containerize.logger
      docker_client = mock_api_client.return_value
  
      lcb = containerize.LocalContainerBuilder(
          self.entry_point,
          self.entry_point,
          self.chief_config,
          self.worker_config,
          destination_dir="/my_app/temp/",
          docker_config=docker_config.DockerConfig(
              image="gcr.io/test-name"
          ),
      )
  
      lcb._get_file_path_map = mock.Mock()
      lcb._get_file_path_map.return_value = {}
      lcb.tar_file_path = ""
      with mock.patch("builtins.open", mock.mock_open(read_data="")):
          img_tag = lcb.get_docker_image()
  
      self.assertEqual(img_tag, "gcr.io/test-name")
  
      # Verify docker APIClient is invoked as expected.
      self.assertEqual(mock_api_client.call_count, 1)
      _, kwargs = mock_api_client.call_args
      self.assertDictEqual(kwargs, {"version": "auto"})
  
      # Verify APIClient().build is invoked as expected.
      self.assertEqual(docker_client.build.call_count, 1)
      _, kwargs = docker_client.build.call_args
      expected = {
          "path": ".",
          "custom_context": True,
          "encoding": "utf-8",
          "tag": img_tag,
      }
      self.assertTrue(
          set(expected.items()).issubset(set(kwargs.items()))
      )
  
      # Verify APIClient().push is invoked as expected.
      self.assertEqual(docker_client.push.call_count, 1)
      args, kwargs = docker_client.push.call_args
      self.assertListEqual(list(args), [img_tag])
      self.assertDictEqual(kwargs, {"decode": True, "stream": True})
  
      # Verify logger info calls.
      self.assertEqual(mock_logger.info.call_count, 2)
      mock_logger.info.assert_has_calls(
          [
              mock.call("Building Docker image: %s", img_tag),
              mock.call("Publishing Docker image: %s", img_tag),
          ]
      )
      self.cleanup(lcb.docker_file_path)
  
imports: import os
  import tempfile
  import uuid
  from absl.testing import absltest
  import docker
  import mock
  from tensorflow_cloud.core import containerize
  from tensorflow_cloud.core import docker_config
  from tensorflow_cloud.core import gcp
  from tensorflow_cloud.core import machine_config
  from tensorflow_cloud.utils import google_api_client
  from tensorflow_cloud.utils import tf_utils
label_desc: Use image node_id 17 for calling the TestContainerize obj's underlying member method code with example usage: obj.test_get_docker_image_with_custom_image_uri(mock_api_client, mock_logger) without return types