code: def test_format_with_properties(
      parser: OrionCmdlineParser,
      cmd_with_properties: List[str],
      hacked_exp: Experiment,
      weird_argument: WeirdArgument,
  ):
      """Test if format correctly puts the value of `trial` and `exp` when used as properties"""
      parser.parse(cmd_with_properties)
      # NOTE: Also using a weird argument here, to make sure the parser is able to distinguish
      # property look-up vs weird argument names.
  
      trial = Trial(
          experiment="trial_test",
          params=[
              {"name": "/lr", "type": "real", "value": -2.4},
              {"name": "/prior", "type": "categorical", "value": "sgd"},
              {
                  "name": f"/{weird_argument.name}",
                  "type": weird_argument.prior_type,
                  "value": weird_argument.value,
              },
          ],
      )
  
      cmd_line = parser.format(None, trial=trial, experiment=hacked_exp)
  
      assert trial.hash_name in cmd_line
      assert "supernaedo2-dendi" in cmd_line
  
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 19 for calling a global function with example usage: test_format_with_properties(parser, cmd_with_properties, hacked_exp, weird_argument) without return types