code: def run_once(self) -> bool:
      f = io.StringIO()
      with redirect_stdout(f):
          super().run_once()
      out = f.getvalue()
      assert out == "hello from component A\nhello from component B\n"
      return True
  
file_path: pytorch-lightning/src/lightning/app/cli/app-template/tests/test_placeholdername_app.py
imports: import io
  import os
  from contextlib import redirect_stdout
  from lightning.app.testing.testing import LightningTestApp, application_testing
label_desc: Use image node_id 1 for calling the LightningAppTestInt obj's underlying member method code with example usage: obj.run_once() and returns: True