docs: def determine_scheduler(
      scheduler: Optional[str], experiment_definition: Dict[str, YamlValue]
  ) -> str:
      """Determine the scheduler to use to run the jobs."""
  
      # Scheduler value from command line has first priority
      if scheduler is not None:
          if scheduler in ["shell", "pbs", "slurm"]:
              return scheduler
          raise ValueError(
              "Argument scheduler only supports input values of ['shell', 'pbs', 'slurm']"
          )
  
      # Next priority goes to the experiment.yml file
      if experiment_definition.get("pbs"):
          return "pbs"
      if experiment_definition.get("slurm"):
          return "slurm"
      if experiment_definition.get("shell"):
          return "shell"
  
      # Final priority goes to the auto-discovery
      if shutil.which("pbs") is not None:
          return "pbs"
      if shutil.which("slurm") is not None:
          return "slurm"
  
      # Default if nothing else is found goes to shell
      return "shell"