code: def _run_multirun_job(cfg: DictConfig) -> float:
      """Runs a maze job which is part of a Hydra --multirun and returns the maximum mean reward of this run.
  
      :param cfg: Hydra configuration for the rollout.
      :return: The maximum mean reward achieved throughout the training run.
      """
      # required for Hydra --multirun (e.g., sweeper)
      clear_global_state()
  
      try:
          _run_job(cfg)
      # when optimizing hyper parameters a single exception
      # in one job should not break the entire experiment
      except:
          return float(np.finfo(np.float32).min)
  
      # load tensorboard log and return maximum mean reward
      # load tensorboard log
      tf_summary_files = glob.glob("*events.out.tfevents*")
      assert (
          len(tf_summary_files) == 1
      ), f"expected exactly 1 tensorflow summary file {tf_summary_files}"
      events_df = tensorboard_to_pandas(tf_summary_files[0])
  
      # compute maximum mean reward
      max_mean_reward = np.max(
          np.asarray(events_df.loc["train_BaseEnvEvents/reward/mean"])
      )
  
      # Add hparams logging to tensorboard
      metrics = [
          ("train_BaseEnvEvents/reward/mean", max_mean_reward, "max")
      ]
      manipulate_hparams_logging_for_exp(
          ".", metrics, clear_hparams=False
      )
  
      return float(max_mean_reward)
  
file_path: maze/maze/maze_cli.py
imports: import glob
  import os
  from typing import Optional
  import hydra
  import matplotlib
  import numpy
  import yaml
  from hydra.core.hydra_config import HydraConfig
  from omegaconf import DictConfig, OmegaConf
  from maze.core.log_stats.hparam_writer_tensorboard import manipulate_hparams_logging_for_exp
  from maze.core.utils.factory import Factory
  from maze.core.utils.seeding import MazeSeeding
  from maze.runner import Runner
  from maze.utils.bcolors import BColors
  from maze.utils.log_stats_utils import clear_global_state
  from maze.utils.tensorboard_reader import tensorboard_to_pandas
label_desc: Use image node_id 3 for calling a global function with example usage: _run_multirun_job(cfg) and returns: float, float