code: def testSerialization(self):
      serialized_pipeline = kubernetes_remote_runner._serialize_pipeline(  # pylint: disable=protected-access
          self.test_pipeline
      )
  
      pipeline = json.loads(serialized_pipeline)
      components = [
          json_utils.loads(component)
          for component in pipeline["components"]
      ]
      metadata_connection_config = metadata_store_pb2.ConnectionConfig()
      json_format.Parse(
          pipeline["metadata_connection_config"],
          metadata_connection_config,
      )
      expected_downstream_ids = {
          "a": ["b", "c"],
          "b": ["c"],
          "c": [],
      }
      self.assertEqual(
          self.test_pipeline.pipeline_info.pipeline_name,
          pipeline["pipeline_name"],
      )
      self.assertEqual(
          self.test_pipeline.pipeline_info.pipeline_root,
          pipeline["pipeline_root"],
      )
      self.assertEqual(
          self.test_pipeline.enable_cache, pipeline["enable_cache"]
      )
      self.assertEqual(
          self.test_pipeline.beam_pipeline_args,
          pipeline["beam_pipeline_args"],
      )
      self.assertEqual(
          self.test_pipeline.metadata_connection_config,
          metadata_connection_config,
      )
      self.assertListEqual(
          [
              component.executor_spec.executor_class
              for component in self.test_pipeline.components
          ],
          [
              component.executor_spec.executor_class
              for component in components
          ],
      )
      self.assertEqual(
          self.test_pipeline.metadata_connection_config,
          metadata_connection_config,
      )
      # Enforce order of downstream ids for comparison.
      for downstream_ids in pipeline["downstream_ids"].values():
          downstream_ids.sort()
      self.assertEqual(
          expected_downstream_ids, pipeline["downstream_ids"]
      )
  
imports: import json
  import tensorflow
  from tfx import types
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.components.base import executor_spec
  from tfx.orchestration import pipeline
  from tfx.orchestration.experimental.kubernetes import kubernetes_remote_runner
  from tfx.types.component_spec import ChannelParameter
  from tfx.utils import json_utils
  from google.protobuf import json_format
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling the KubernetesRemoteRunnerTest obj's underlying member method code with example usage: obj.testSerialization() without return types