code: def testGraphTraversal_NodeIds_OutputKeys(self):
      model_2 = self.prepare_tfx_artifact(
          test_utils.Model,
      )
      model_3 = self.prepare_tfx_artifact(
          test_utils.Model,
      )
  
      custom_trainer_context = self.build_node_context(
          self.pipeline_name, "tf-trainer.student-model"
      )
      self.put_execution(
          "CustomTrainer",
          inputs={
              "examples": self.unwrap_tfx_artifacts(self.examples),
              "transform_graph": self.unwrap_tfx_artifacts(
                  [self.transform_graph]
              ),
          },
          outputs={
              "parent_model": self.unwrap_tfx_artifacts([model_2]),
              "child_model": self.unwrap_tfx_artifacts([model_3]),
          },
          contexts=[self.pipeline_context, custom_trainer_context],
      )
  
      result = self._graph_traversal(
          self.examples[0],
          traverse_upstream=False,
          artifact_type_names=[
              "Model",
          ],
          node_ids=["tf-trainer.palm-model"],
      )
      self.assertArtifactMapsEqual(
          result,
          {
              "root_artifact": [self.examples[0]],
              "Model": [self.model],
          },
      )
  
      result = self._graph_traversal(
          self.examples[0],
          traverse_upstream=False,
          artifact_type_names=[
              "Model",
          ],
          node_ids=["tf-trainer.palm-model"],
          output_keys=["parent_model"],
      )
      self.assertArtifactMapsEqual(
          result,
          {
              "root_artifact": [self.examples[0]],
              "Model": [],
          },
      )
  
      result = self._graph_traversal(
          self.examples[0],
          traverse_upstream=False,
          artifact_type_names=[
              "Model",
          ],
          node_ids=["tf-trainer.student-model"],
      )
      self.assertArtifactMapsEqual(
          result,
          {
              "root_artifact": [self.examples[0]],
              "Model": [model_2, model_3],
          },
      )
  
      result = self._graph_traversal(
          self.examples[0],
          traverse_upstream=False,
          artifact_type_names=[
              "Model",
          ],
          node_ids=["tf-trainer.student-model"],
          output_keys=["child_model"],
      )
      self.assertArtifactMapsEqual(
          result,
          {
              "root_artifact": [self.examples[0]],
              "Model": [model_3],
          },
      )
  
      result = self._graph_traversal(
          model_3,
          traverse_upstream=True,
          artifact_type_names=[
              "TransformGraph",
          ],
          node_ids=["transform.my-transform"],
          output_keys=["transform_graph"],
      )
      self.assertArtifactMapsEqual(
          result,
          {
              "root_artifact": [model_3],
              "TransformGraph": [self.transform_graph],
          },
      )
  
file_path: tfx/tfx/dsl/input_resolution/ops/graph_traversal_op_test.py
imports: from typing import Sequence
  import tensorflow
  from tfx import types
  from tfx.dsl.input_resolution.ops import ops
  from tfx.dsl.input_resolution.ops import test_utils
label_desc: Use image node_id 10 for calling the GraphTraversalOpTest obj's underlying member method code with example usage: obj.testGraphTraversal_NodeIds_OutputKeys() without return types