code: def setUp(self):
      super().setUp()
      self.addCleanup(mock.patch.stopall)
      # Here we mock resolution processes that requires MLMD store access because
      # they require too complex setup that are mostly irrelevent to the
      # node_inputs_resolver functionality. Each resolution submodule
      # (channel_resolver_test and input_graph_resolver_test) already contains
      # tests with more realistic examples.
      self._mlmd_handle = mock.MagicMock()
  
      # For each specific resolution process to mock, we directly store the side
      # effect mapping (argument and corresponding result). It is difficult to
      # use mock.return_value as we call mock method multiple times with different
      # arguments, expecting different results.
  
      # _channel_resolve_result stores InputSpec -> List[Artifact] mapping.
      self._channel_resolve_result = {}
      # _graph_fn_result stores InputGraph -> (GraphFn, List[str]) mapping.
      self._graph_fn_result = {}
      mock.patch.object(
          channel_resolver,
          "resolve_union_channels",
          self._mock_resolve_union_channels,
      ).start()
      mock.patch.object(
          input_graph_resolver,
          "build_graph_fn",
          self._mock_build_graph_fn,
      ).start()
  
imports: from typing import Set
  from unittest import mock
  import tensorflow
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.orchestration.portable.input_resolution import input_graph_resolver
  from tfx.orchestration.portable.input_resolution import node_inputs_resolver
  from tfx.orchestration.portable.input_resolution import partition_utils
  from tfx.orchestration.portable.input_resolution import channel_resolver
  from tfx.proto.orchestration import pipeline_pb2
  import tfx.types
  from tfx.types import channel_utils
  from tfx.utils import test_case_utils
  from google.protobuf import text_format
label_desc: Use image node_id 1 for calling the NodeInputsResolverTest obj's underlying member method code with example usage: obj.setUp() without return types