docstr: Check the component is executed exactly once.
code: def assertExecutedOnce(self, component: str) -> None:
      """Check the component is executed exactly once."""
      component_path = os.path.join(self._pipeline_root, component)
      self.assertTrue(fileio.exists(component_path))
      outputs = fileio.listdir(component_path)
      self.assertIn(".system", outputs)
      outputs.remove(".system")
      system_paths = [
          os.path.join(".system", path)
          for path in fileio.listdir(
              os.path.join(component_path, ".system")
          )
      ]
      self.assertNotEmpty(system_paths)
      self.assertIn(".system/executor_execution", system_paths)
      outputs.extend(system_paths)
      self.assertNotEmpty(outputs)
      for output in outputs:
          execution = fileio.listdir(
              os.path.join(component_path, output)
          )
          if output == ".system/stateful_working_dir":
              self.assertEmpty(execution)
          else:
              self.assertLen(execution, 1)
  
file_path: tfx/tfx/examples/mnist/mnist_pipeline_native_keras_e2e_test.py
imports: import os
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.examples.mnist import mnist_pipeline_native_keras
  from tfx.orchestration import metadata
  from tfx.orchestration.beam.beam_dag_runner import BeamDagRunner
label_desc: Use image node_id 2 for calling the MNISTPipelineNativeKerasEndToEndTest obj's underlying member method code with example usage: obj.assertExecutedOnce(component) without return types