class_docstr: Python interface commandline parser
  
  The `OrionCmdlineParser` is used as a way to obtain the parsing process of Orion
  through a Python interface. It provides different dictionaries containing information
  for different parts of the parsing process. It also exposes methods to retrieve the
  command line with formatted values for parameters.
  
  Parameters
  ----------
  config_prefix : str, optional
      Prefix for the configuration file used by the parser to identify it.
  allow_non_existing_files : bool, optional
      If True, will parse all commandline but ignore non existing user script or configuration
      files if non-existent. Default is False
  
  Attributes
  ----------
  parser : CmdlineParser
      Parser that will be used to parse the commandline.
  cmd_priors : OrderedDict
      An OrderedDict containing only the priors inside the commandline.
  file_priors : OrderedDict
      An OrderedDict obtained by parsing the config file, if one was found.
  priors : OrderedDict
      An OrderedDict obtained from merging `cmd_priors` and `file_priors`.
  user_script : str
      File path of the script executed (inferred from parsed commandline)
  config_prefix : str
      Prefix for the configuration file used by the parser to identify it.
  file_config_path : str
      If a config file was found, this file contain the path. `None` otherwise.
  converter : BaseConverter
      A BaseConverter object to parse the config file.
  
  Methods
  -------
  parse(commandline)
      Parses the commandline and populate the OrderedDict
  format(trial, experiment) : str
      Return the commandline with replaced values for priors and attributes
docstr: Create the commandline for the user's script.
  
  Recreate the commandline passed to Orion for the user's script by replacing the instances
  of priors' expression by their actual value inside the `trial`. If a `config_path` is given,
  use the config file template to generate a new temporary one. Any templated argument of the
  form `{trial.xxx}` or `{exp.xxx}` will be replaced by their corresponding value.
  
  Parameters
  ----------
  config_path: str
      Path to the temporary config file. Must be given if the parser has a `file_config_path`.
  trial: `orion.core.worker.trial.Trial`
      A `Trial` object containing the values for the priors.
  experiment: `orion.core.worker.experiment.Experiment`
      An `Experiment` object containing information relative to the `trial`'s experiment.
  
  Returns
  -------
  list
      The commandline arguments.
  
  Raises
  ------
  ValueError
      If the configuration contains a config file but `format()` is called without the
      argument `config_path`.
docstr_tok: ["Create","the","commandline","for","the","user","'s","script",".","Recreate","the","commandline","passed","to","Orion","for","the","user","'s","script","by","replacing","the","instances","of","priors","'","expression","by","their","actual","value","inside","the","`","trial","`",".","If","a","`","config_path","`","is","given",",","use","the","config","file","template","to","generate","a","new","temporary","one",".","Any","templated","argument","of","the","form","`","{","trial.xxx","}","`","or","`","{","exp.xxx","}","`","will","be","replaced","by","their","corresponding","value",".","Parameters","--","--","--","--","--","config_path",":","str","Path","to","the","temporary","config","file",".","Must","be","given","if","the","parser","has","a","`","file_config_path","`",".","trial",":","`","orion.core.worker.trial.Trial","`","A","`","Trial","`","object","containing","the","values","for","the","priors",".","experiment",":","`","orion.core.worker.experiment.Experiment","`","An","`","Experiment","`","object","containing","information","relative","to","the","`","trial","`","'s","experiment",".","Returns","--","--","--","-","list","The","commandline","arguments",".","Raises","--","--","--","ValueError","If","the","configuration","contains","a","config","file","but","`","format","(",")","`","is","called","without","the","argument","`","config_path","`","."]
code: def format(self, config_path=None, trial=None, experiment=None):
      """Create the commandline for the user's script.
  
      Recreate the commandline passed to Orion for the user's script by replacing the instances
      of priors' expression by their actual value inside the `trial`. If a `config_path` is given,
      use the config file template to generate a new temporary one. Any templated argument of the
      form `{trial.xxx}` or `{exp.xxx}` will be replaced by their corresponding value.
  
      Parameters
      ----------
      config_path: str
          Path to the temporary config file. Must be given if the parser has a `file_config_path`.
      trial: `orion.core.worker.trial.Trial`
          A `Trial` object containing the values for the priors.
      experiment: `orion.core.worker.experiment.Experiment`
          An `Experiment` object containing information relative to the `trial`'s experiment.
  
      Returns
      -------
      list
          The commandline arguments.
  
      Raises
      ------
      ValueError
          If the configuration contains a config file but `format()` is called without the
          argument `config_path`.
  
      """
      if self.file_config_path and config_path is None:
          raise ValueError(
              "The configuration contains a config file. "
              "Cannot format without a `config_path` argument."
          )
      elif self.file_config_path:
          self._create_config_file(config_path, trial)
      configuration = self._build_configuration(trial)
  
      if config_path is not None:
          configuration[self.config_prefix] = config_path
  
      templated = self.parser.format(configuration)
  
      trial_and_exp = dict(trial=trial, exp=experiment)
  
      for idx, item in enumerate(templated):
          templated[idx] = item.format(**trial_and_exp)
  
      return templated
  
imports: import copy
  import errno
  import logging
  import os
  import re
  import shutil
  from collections import OrderedDict, defaultdict
  from orion.core.io.cmdline_parser import CmdlineParser
  from orion.core.io.convert import infer_converter_from_file_type
  from orion.core.utils.flatten import flatten
label_desc: Use image node_id 16 for calling the OrionCmdlineParser obj's underlying member method code with example usage: obj.format(config_path, trial, experiment) and returns: templated