code: def test_serialize_assets(self):
      # TF 1.x is not supported
      if utils.is_tf_v1():
          with self.assertRaises(RuntimeError):
              client.cloud_fit(
                  self._model,
                  x=self._dataset,
                  validation_data=self._dataset,
                  remote_dir=self._remote_dir,
                  job_spec=self._job_spec,
                  batch_size=1,
                  epochs=2,
                  verbose=3,
              )
          return
      tensorboard_callback = tf.keras.callbacks.TensorBoard(
          log_dir=self._remote_dir
      )
      args = self._scalar_fit_kwargs
      args["callbacks"] = [tensorboard_callback]
  
      client._serialize_assets(self._remote_dir, self._model, **args)
      self.assertGreaterEqual(
          len(
              tf.io.gfile.listdir(
                  os.path.join(self._remote_dir, "training_assets")
              )
          ),
          1,
      )
      self.assertGreaterEqual(
          len(
              tf.io.gfile.listdir(
                  os.path.join(self._remote_dir, "model")
              )
          ),
          1,
      )
  
      training_assets_graph = tf.saved_model.load(
          os.path.join(self._remote_dir, "training_assets")
      )
  
      pickled_callbacks = tfds.as_numpy(
          training_assets_graph.callbacks_fn()
      )
      unpickled_callbacks = pickle.loads(pickled_callbacks)
      self.assertIsInstance(
          unpickled_callbacks[0], tf.keras.callbacks.TensorBoard
      )
  
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 6 for calling the CloudFitClientTest obj's underlying member method code with example usage: obj.test_serialize_assets() without return types