code: def run(remote_dir: Text, distribution_strategy_text: Text) -> None:
      """deserializes Model and Dataset and runs them.
  
      Args:
          remote_dir: Temporary cloud storage folder that contains model and
              Dataset graph. This folder is also used for job output.
          distribution_strategy_text: Specifies the distribution strategy for
              remote execution when a jobspec is provided. Accepted values are
              strategy names as specified by 'tf.distribute.<strategy>.__name__'.
      """
      logging.info(
          "Setting distribution strategy to %s",
          distribution_strategy_text,
      )
  
      distribution_strategy = SUPPORTED_DISTRIBUTION_STRATEGIES[
          distribution_strategy_text
      ]()
  
      with distribution_strategy.scope():
          if cloud_fit_utils.is_tf_v1():
              training_assets_graph = tf.compat.v2.saved_model.load(
                  export_dir=os.path.join(
                      remote_dir, "training_assets"
                  ),
                  tags=None,
              )
          else:
              training_assets_graph = tf.saved_model.load(
                  os.path.join(remote_dir, "training_assets")
              )
  
          fit_kwargs = {}
          if hasattr(training_assets_graph, "fit_kwargs_fn"):
              # Specific fit_kwargs required for TFX tuner_fn.
              train_files = None
              eval_files = None
              transform_graph = None
              label_key = None
              train_batch_size = None
              eval_batch_size = None
              if "label_key" in training_assets_graph.fit_kwargs_fn():
                  label_key_byte = tfds.as_numpy(
                      training_assets_graph.fit_kwargs_fn()["label_key"]
                  )
                  label_key = label_key_byte.decode("ASCII")
              if (
                  "transform_graph_path"
                  in training_assets_graph.fit_kwargs_fn()
              ):
                  transform_graph_path = tfds.as_numpy(
                      training_assets_graph.fit_kwargs_fn()[
                          "transform_graph_path"
                      ]
                  )
                  # Decode the path from byte to string object.
                  transform_graph = tft.TFTransformOutput(
                      transform_graph_path.decode("ASCII")
                  )
                  logging.info(
                      "transform_graph was loaded successfully."
                  )
              if "train_files" in training_assets_graph.fit_kwargs_fn():
                  train_files_byte = tfds.as_numpy(
                      training_assets_graph.fit_kwargs_fn()[
                          "train_files"
                      ]
                  )
                  train_files = [
                      x.decode("ASCII") for x in train_files_byte
                  ]
              if "eval_files" in training_assets_graph.fit_kwargs_fn():
                  eval_files_byte = tfds.as_numpy(
                      training_assets_graph.fit_kwargs_fn()[
                          "eval_files"
                      ]
                  )
                  eval_files = [
                      x.decode("ASCII") for x in eval_files_byte
                  ]
  
              if (
                  "train_batch_size"
                  in training_assets_graph.fit_kwargs_fn()
              ):
                  train_batch_size = tfds.as_numpy(
                      training_assets_graph.fit_kwargs_fn()[
                          "train_batch_size"
                      ]
                  )
              if (
                  "eval_batch_size"
                  in training_assets_graph.fit_kwargs_fn()
              ):
                  eval_batch_size = tfds.as_numpy(
                      training_assets_graph.fit_kwargs_fn()[
                          "eval_batch_size"
                      ]
                  )
  
              if (
                  train_files
                  and transform_graph
                  and label_key
                  and train_batch_size
              ):  # pylint: disable=line-too-long
                  fit_kwargs["x"] = _input_fn(
                      train_files,
                      transform_graph,
                      label_key,
                      batch_size=train_batch_size,
                  )
                  logging.info("x was loaded successfully.")
  
              if (
                  eval_files
                  and transform_graph
                  and label_key
                  and eval_batch_size
              ):
                  fit_kwargs["validation_data"] = _input_fn(
                      eval_files,
                      transform_graph,
                      label_key,
                      batch_size=eval_batch_size,
                  )
                  logging.info(
                      "validation data was loaded successfully."
                  )
  
              for k in training_assets_graph.fit_kwargs_fn().keys():
                  # Specific fit_kwargs for TFX AIP Tuner component.
                  tfx_fit_kwargs = [
                      "train_files",
                      "eval_files",
                      "label_key",
                      "transform_graph_path",
                      "train_batch_size",
                      "eval_batch_size",
                  ]
                  # deserialize the rest of the fit_kwargs
                  if k not in tfx_fit_kwargs:
                      fit_kwargs[k] = tfds.as_numpy(
                          training_assets_graph.fit_kwargs_fn()[k]
                      )
              logging.info("fit_kwargs were loaded successfully.")
  
          if hasattr(training_assets_graph, "x_fn"):
              fit_kwargs["x"] = training_assets_graph.x_fn()
              logging.info("x was loaded successfully.")
  
          if hasattr(training_assets_graph, "y_fn"):
              fit_kwargs["y"] = training_assets_graph.y_fn()
              logging.info("y was loaded successfully.")
  
          if hasattr(training_assets_graph, "validation_data_fn"):
              fit_kwargs[
                  "validation_data"
              ] = training_assets_graph.validation_data_fn()
  
          if hasattr(training_assets_graph, "callbacks_fn"):
              pickled_callbacks = tfds.as_numpy(
                  training_assets_graph.callbacks_fn()
              )
              fit_kwargs["callbacks"] = pickle.loads(pickled_callbacks)
              logging.info("callbacks were loaded successfully.")
  
          model = tf.keras.models.load_model(
              os.path.join(remote_dir, "model")
          )
          logging.info(
              "Model was loaded from %s successfully.",
              os.path.join(remote_dir, "model"),
          )
          model.fit(**fit_kwargs)
  
file_path: cloud/src/python/tensorflow_cloud/tuner/cloud_fit_remote.py
imports: import os
  import pickle
  from typing import List, Text
  from absl import app
  from absl import flags
  from absl import logging
  import tensorflow
  import tensorflow_datasets
  import tensorflow_transform
  from tensorflow_cloud.tuner import cloud_fit_utils
label_desc: Use image node_id 5 for calling a global function with example usage: run(remote_dir, distribution_strategy_text) without return types