code: def set_matplotlib_backend() -> None:
      """Switch matplotlib backend for maze runs on headless machines to Agg (non-interactive)."""
      if not os.environ.get("MPLBACKEND") and not os.environ.get(
          "DISPLAY"
      ):
          BColors.print_colored(
              f"INFO: No display detected! Switching matplotlib to headless backend Agg!",
              color=BColors.OKBLUE,
          )
          matplotlib.use("Agg")
  
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 1 for calling a global function with example usage: set_matplotlib_backend() without return types