code: def run(self):
      self.train_model.run()
      self.model_server.run(self.train_model.best_model_path)
      if self.model_server.alive():
          # The performance tester needs the model server to be up
          # and running to be started, so the URL is added in the UI.
          self.performance_tester.run(self.model_server.url)
  
file_path: pytorch-lightning/docs/source-app/examples/model_server_app/app.py
imports: from locust_component import Locust
  from model_server import MLServer
  from train import TrainModel
  from lightning import LightningApp, LightningFlow
label_desc: Use image node_id 2 for calling the TrainAndServe obj's underlying member method code with example usage: obj.run() without return types