code: def test_distribution_strategy(
      self, mock_serialize_assets, mock_submit_job
  ):
      # TF 1.x is not supported
      if utils.is_tf_v1():
          with self.assertRaises(RuntimeError):
              client.cloud_fit(
                  self._model,
                  x=self._dataset,
                  remote_dir=self._remote_dir,
              )
          return
  
      client.cloud_fit(
          self._model, x=self._dataset, remote_dir=self._remote_dir
      )
  
      kargs, _ = mock_submit_job.call_args
      body, _ = kargs
      self.assertDictContainsSubset(
          {
              "args": [
                  "--remote_dir",
                  self._remote_dir,
                  "--distribution_strategy",
                  MULTI_WORKER_MIRRORED_STRATEGY_NAME,
              ],
          },
          body["trainingInput"],
      )
  
      client.cloud_fit(
          self._model,
          x=self._dataset,
          remote_dir=self._remote_dir,
          distribution_strategy=MIRRORED_STRATEGY_NAME,
          job_spec=self._job_spec,
      )
  
      kargs, _ = mock_submit_job.call_args
      body, _ = kargs
      self.assertDictContainsSubset(
          {
              "args": [
                  "--remote_dir",
                  self._remote_dir,
                  "--distribution_strategy",
                  MIRRORED_STRATEGY_NAME,
              ],
          },
          body["trainingInput"],
      )
  
      with self.assertRaises(ValueError):
          client.cloud_fit(
              self._model,
              x=self._dataset,
              remote_dir=self._remote_dir,
              distribution_strategy="not_implemented_strategy",
              job_spec=self._job_spec,
          )
  
imports: import os
  import pickle
  import tempfile
  from unittest import mock
  from googleapiclient import discovery
  import tensorflow
  import tensorflow_datasets
  from tensorflow_cloud.tuner import cloud_fit_client
  from tensorflow_cloud.tuner import cloud_fit_utils
  from tensorflow_cloud.utils import google_api_client
label_desc: Use image node_id 9 for calling the CloudFitClientTest obj's underlying member method code with example usage: obj.test_distribution_strategy(mock_serialize_assets, mock_submit_job) without return types