code: def testPairedInput(self):
      xs = canned_resolver_functions.paired_spans(
          {
              "x": channel_utils.artifact_query(
                  test_utils.DummyArtifact,
              ),
              "examples": channel_utils.artifact_query(
                  test_utils.Examples,
              ),
          },
          keep_all_versions=True,
      )
      self._insert_artifacts_into_mlmd(
          [0, 1, 2], [0, 0, 0], "DummyArtifact"
      )
      self._insert_artifacts_into_mlmd([0, 1], [0, 0], "Examples")
  
      with for_each.ForEach(xs) as each_x:
          inputs = each_x
      pipeline_node = test_utils.compile_inputs(inputs)
  
      resolved = inputs_utils.resolve_input_artifacts(
          pipeline_node=pipeline_node, metadata_handle=self.mlmd_handle
      )
  
      self.assertLen(resolved, 2)
      expected_spans = [0, 1]
      expected_versions = [0, 0]
  
      for i, artifacts in enumerate(resolved):
          example = artifacts["examples"][0].mlmd_artifact
          x = artifacts["x"][0].mlmd_artifact
  
          self.assertEqual(
              example.properties["span"].int_value, expected_spans[i]
          )
          self.assertEqual(
              example.properties["version"].int_value,
              expected_versions[i],
          )
          # Paired input is paired over span and version.
          self.assertEqual(
              example.properties["span"].int_value,
              x.properties["span"].int_value,
          )
          self.assertEqual(
              example.properties["version"].int_value,
              x.properties["version"].int_value,
          )
  
imports: from typing import Sequence
  import tensorflow
  from tfx import types
  from tfx.dsl.control_flow import for_each
  from tfx.dsl.input_resolution import canned_resolver_functions
  from tfx.dsl.input_resolution import resolver_op
  from tfx.dsl.input_resolution.ops import test_utils
  from tfx.orchestration import pipeline
  from tfx.orchestration.portable import inputs_utils
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.types import channel_utils
  from tfx.types import resolved_channel
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 18 for calling the CannedResolverFunctionsTest obj's underlying member method code with example usage: obj.testPairedInput() without return types