code: def setUp(self):
      super().setUp()
      pipeline_root = os.path.join(
          os.environ.get(
              "TEST_UNDECLARED_OUTPUTS_DIR", self.get_temp_dir()
          ),
          self.id(),
      )
  
      # Makes sure multiple connections within a test always connect to the same
      # MLMD instance.
      metadata_path = os.path.join(
          pipeline_root, "metadata", "metadata.db"
      )
      connection_config = metadata.sqlite_metadata_connection_config(
          metadata_path
      )
      connection_config.sqlite.SetInParent()
      self._mlmd_connection = metadata.Metadata(
          connection_config=connection_config
      )
      self._testdata_dir = os.path.join(
          os.path.dirname(__file__), "testdata"
      )
  
      # Sets up pipelines
      pipeline = pipeline_pb2.Pipeline()
      self.load_proto_from_text(
          os.path.join(
              os.path.dirname(__file__),
              "testdata",
              "pipeline_for_resolver_test.pbtxt",
          ),
          pipeline,
      )
      self._pipeline_info = pipeline.pipeline_info
      self._pipeline_runtime_spec = pipeline.runtime_spec
      runtime_parameter_utils.substitute_runtime_parameter(
          pipeline,
          {
              constants.PIPELINE_RUN_ID_PARAMETER_NAME: "my_pipeline_run",
          },
      )
  
      # Extracts components
      self._my_trainer = pipeline.nodes[0].pipeline_node
      self._my_resolver = pipeline.nodes[1].pipeline_node
      self._model_type = self._my_trainer.outputs.outputs[
          "model"
      ].artifact_spec.type
  
imports: import os
  from unittest import mock
  import tensorflow
  from tfx import types
  from tfx import version
  from tfx.dsl.compiler import constants
  from tfx.orchestration import metadata
  from tfx.orchestration.portable import execution_publish_utils
  from tfx.orchestration.portable import inputs_utils
  from tfx.orchestration.portable import resolver_node_handler
  from tfx.orchestration.portable import runtime_parameter_utils
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.mlmd import context_lib
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import artifact_utils
  from tfx.utils import test_case_utils
label_desc: Use image node_id 1 for calling the ResolverNodeHandlerTest obj's underlying member method code with example usage: obj.setUp() without return types