code: def run(self):
      # pretend to train and save a checkpoint every 10 steps
      for step in range(1000):
          time.sleep(1.0)
          fake_loss = round(1 / (step + 0.00001), 4)
          print(f"{step=}: {fake_loss=} ")
          if step % 10 == 0:
              self.last_checkpoint_path = (
                  f"/some/path/{step=}_{fake_loss=}"
              )
              print(
                  f"TRAIN COMPONENT: saved new checkpoint: {self.last_checkpoint_path}"
              )
  
file_path: pytorch-lightning/docs/source-app/levels/intermediate/scripts/two_work_comms.py
imports: from lightning.app import LightningWork, LightningFlow, LightningApp
  import time
label_desc: Use image node_id 2 for calling the TrainComponent obj's underlying member method code with example usage: obj.run() without return types