code: def test_format_commandline_only(
      parser: OrionCmdlineParser,
      commandline: List[str],
      weird_argument: WeirdArgument,
  ):
      """Format the commandline using only args."""
      parser.parse(commandline)
  
      trial = Trial(
          params=[
              {"name": "/lr", "type": "real", "value": -2.4},
              {"name": "/prior", "type": "categorical", "value": "sgd"},
              {"name": "/a.b", "type": "real", "value": 0.5},
              {
                  "name": f"/{weird_argument.name}",
                  "type": weird_argument.prior_type,
                  "value": weird_argument.value,
              },
          ]
      )
  
      cmd_inst = parser.format(trial=trial)
      assert cmd_inst == [
          "--seed",
          "555",
          "--lr",
          "-2.4",
          "--non-prior",
          "choices({'sgd': 0.2, 'adam': 0.8})",
          "--prior",
          "sgd",
          "--a.b",
          "0.5",
          f"--{weird_argument.name}",
          f"{weird_argument.value}",
      ]
  
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 16 for calling a global function with example usage: test_format_commandline_only(parser, commandline, weird_argument) without return types