code: def setUp(self):
      super(TestDeploy, self).setUp()
  
      self._mock_discovery_build = mock.patch.object(
          discovery, "build", autospec=True
      ).start()
  
      self.mock_job_id = "tf-train-abcde"
      self.mock_project_name = "my-gcp-project"
      self.entry_point = "sample_compile_fit.py"
      self.chief_config = machine_config.COMMON_MACHINE_CONFIGS[
          "K80_4X"
      ]
      self.worker_count = 2
      self.worker_config = machine_config.COMMON_MACHINE_CONFIGS[
          "K80_1X"
      ]
      self.region = "us-central-a"
      self.docker_img = "custom-image-tag"
      self.entry_point_args = ["1000"]
      self.stream_logs = False
      self.service_account = (
          "test_sa@test-project.iam.gserviceaccount.com"
      )
  
      self.expected_request_dict = {
          "jobId": self.mock_job_id,
          "trainingInput": {
              "use_chief_in_tf_config": True,
              "scaleTier": "custom",
              "region": self.region,
              "args": self.entry_point_args,
              "serviceAccount": self.service_account,
              "masterType": "n1-standard-16",
              "workerType": "n1-standard-8",
              "workerCount": str(self.worker_count),
              "workerConfig": {
                  "acceleratorConfig": {
                      "count": "1",
                      "type": "NVIDIA_TESLA_K80",
                  },
                  "imageUri": self.docker_img,
              },
              "masterConfig": {
                  "acceleratorConfig": {
                      "count": "4",
                      "type": "NVIDIA_TESLA_K80",
                  },
                  "imageUri": self.docker_img,
              },
          },
      }
  
      mock.patch.object(
          deploy,
          "_generate_job_id",
          autospec=True,
          return_value=self.mock_job_id,
      ).start()
  
      mock.patch.object(
          gcp,
          "get_project_name",
          autospec=True,
          return_value=self.mock_project_name,
      ).start()
  
      mock.patch.object(
          gcp,
          "get_region",
          autospec=True,
          return_value=self.region,
      ).start()
  
file_path: cloud/src/python/tensorflow_cloud/core/tests/unit/deploy_test.py
imports: import io
  from absl.testing import absltest
  from googleapiclient import discovery
  from googleapiclient import errors
  import mock
  from tensorflow_cloud.core import deploy
  from tensorflow_cloud.core import gcp
  from tensorflow_cloud.core import machine_config
  from tensorflow_cloud.utils import google_api_client
label_desc: Use image node_id 1 for calling the TestDeploy obj's underlying member method code with example usage: obj.setUp() without return types