code: def setUp(self):
      super().setUp()
      pipeline_root = os.path.join(
          os.environ.get(
              "TEST_UNDECLARED_OUTPUTS_DIR", self.get_temp_dir()
          ),
          self.id(),
      )
      self._pipeline_root = pipeline_root
  
      # Makes sure multiple connections within a test always connect to the same
      # MLMD instance.
      metadata_path = os.path.join(
          pipeline_root, "metadata", "metadata.db"
      )
      self._mlmd_connection_manager = (
          mlmd_cm.MLMDConnectionManager.sqlite(metadata_path)
      )
      self.enter_context(self._mlmd_connection_manager)
      self._mlmd_connection = (
          self._mlmd_connection_manager.primary_mlmd_handle
      )
  
      # Sets up the pipeline.
      pipeline = test_async_pipeline.create_pipeline()
      self._pipeline = pipeline
      pipeline.runtime_spec.pipeline_root.field_value.string_value = (
          pipeline_root
      )
      pipeline.runtime_spec.pipeline_run_id.field_value.string_value = (
          _PIPELINE_RUN_ID
      )
  
      # Extracts components.
      self._example_gen = pipeline.nodes[0].pipeline_node
      self._transform = pipeline.nodes[1].pipeline_node
      self._trainer = pipeline.nodes[2].pipeline_node
  
imports: import os
  import time
  from unittest import mock
  import uuid
  from absl.testing import parameterized
  import tensorflow
  from tfx import types
  from tfx import version
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import node_proto_view
  from tfx.orchestration.experimental.core import constants
  from tfx.orchestration.experimental.core import pipeline_state
  from tfx.orchestration.experimental.core import task
  from tfx.orchestration.experimental.core import task_gen_utils
  from tfx.orchestration.experimental.core import test_utils
  from tfx.orchestration.experimental.core.testing import test_async_pipeline
  from tfx.orchestration.experimental.core.testing import test_dynamic_exec_properties_pipeline
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable import outputs_utils
  from tfx.orchestration.portable.mlmd import execution_lib
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.proto.orchestration import placeholder_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_artifacts
  from tfx.utils import status
  from tfx.utils import test_case_utils
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling the TaskGenUtilsTest obj's underlying member method code with example usage: obj.setUp() without return types