docstr: Check the component is executed exactly once.
docstr_tok: ["Check","the","component","is","executed","exactly","once","."]
code: def assertExecutedOnce(self, component) -> None:
      """Check the component is executed exactly once."""
      component_path = os.path.join(self._pipeline_root, component)
      self.assertTrue(tf.io.gfile.exists(component_path))
      outputs = tf.io.gfile.listdir(component_path)
      for output in outputs:
          execution = tf.io.gfile.listdir(
              os.path.join(component_path, output)
          )
          self.assertEqual(1, len(execution))
  
file_path: tfx/tfx/examples/ranking/ranking_pipeline_e2e_test.py
imports: import os
  import unittest
  import tensorflow
  from tfx.examples.ranking import ranking_pipeline
  from tfx.orchestration import metadata
  from tfx.orchestration.beam.beam_dag_runner import BeamDagRunner
label_desc: Use image node_id 2 for calling the RankingPipelineTest obj's underlying member method code with example usage: obj.assertExecutedOnce(component) without return types