code: def run(self):
      if self.num_trials >= self.total_trials:
          self.stop()
  
      has_told_study = []
  
      for trial_idx in range(self.num_trials):
          work_name = f"objective_work_{trial_idx}"
          if work_name not in self.ws:
              objective_work = ObjectiveWork(
                  script_path=self.script_path,
                  data_dir=self.data_dir,
                  cloud_compute=CloudCompute("cpu"),
              )
              self.ws[work_name] = objective_work
          if not self.ws[work_name].has_started:
              trial = self._study.ask(ObjectiveWork.distributions())
              self.ws[work_name].run(
                  trial_id=trial._trial_id, **trial.params
              )
  
          if (
              self.ws[work_name].metric
              and not self.ws[work_name].has_told_study
          ):
              self._study.tell(
                  self.ws[work_name].trial_id, self.ws[work_name].metric
              )
              self.ws[work_name].has_told_study = True
  
          has_told_study.append(self.ws[work_name].has_told_study)
  
      if all(has_told_study):
          self.num_trials += self.simultaneous_trials
  
file_path: pytorch-lightning/examples/app/hpo/app_wo_ui.py
imports: from pathlib import Path
  import optuna
  from lightning.app import CloudCompute, LightningApp, LightningFlow
  from lightning.app.structures import Dict
  from objective import ObjectiveWork
label_desc: Use image node_id 2 for calling the RootHPOFlow obj's underlying member method code with example usage: obj.run() without return types