code: def test_format_without_config_path(
      parser: OrionCmdlineParser,
      commandline: List[str],
      json_config: List[str],
      tmp_path: Path,
      json_converter: JSONConverter,
      weird_argument: WeirdArgument,
  ):
      """Verify that parser.format() raises ValueError when config path not passed."""
      cmd_args = json_config
      cmd_args.extend(commandline)
  
      parser.parse(cmd_args)
  
      trial = Trial(
          params=[
              {"name": "/lr", "type": "real", "value": -2.4},
              {"name": "/prior", "type": "categorical", "value": "sgd"},
              {
                  "name": "/layers/1/width",
                  "type": "integer",
                  "value": 100,
              },
              {
                  "name": "/layers/1/type",
                  "type": "categorical",
                  "value": "relu",
              },
              {
                  "name": "/layers/2/type",
                  "type": "categorical",
                  "value": "sigmoid",
              },
              {"name": "/training/lr0", "type": "real", "value": 0.032},
              {"name": "/training/mbs", "type": "integer", "value": 64},
              {
                  "name": "/something-same",
                  "type": "categorical",
                  "value": "3",
              },
              {
                  "name": f"/{weird_argument.name}",
                  "type": "categorical",
                  "value": weird_argument.value,
              },
          ]
      )
  
      with pytest.raises(
          ValueError,
          match="Cannot format without a `config_path` argument.",
      ):
          parser.format(trial=trial)
  
imports: import os
  from pathlib import Path
  from typing import Any, List, NamedTuple, Optional, Tuple
  import pytest
  from orion.core.io.convert import JSONConverter
  from orion.core.io.orion_cmdline_parser import OrionCmdlineParser
  from orion.core.worker.experiment import Experiment
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 18 for calling a global function with example usage: test_format_without_config_path(parser, commandline, json_config, tmp_path, json_converter, weird_argument) without return types