code: def algo_observe(algo, trials, results):
      """Convert trials so that algo can observe with legacy format (trials, results)."""
      for trial, trial_results in zip(trials, results):
          for name, trial_result in trial_results.items():
              if trial.exp_working_dir is None:
                  trial.exp_working_dir = "/nothing"
              trial.status = "completed"
              trial.results.append(
                  Trial.Result(name=name, type=name, value=trial_result)
              )
  
      algo.observe(trials)
  
file_path: orion/src/orion/core/utils/backward.py
imports: import copy
  import logging
  import pprint
  import orion.core
  from orion.core.io.orion_cmdline_parser import OrionCmdlineParser
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 9 for calling a global function with example usage: algo_observe(algo, trials, results) without return types