code: def populate_priors(metadata):
      """Compute parser state and priors based on user_args and populate metadata."""
      if "user_args" not in metadata:
          return
  
      update_user_args(metadata)
  
      parser = OrionCmdlineParser(
          orion.core.config.worker.user_script_config,
          allow_non_existing_files=True,
      )
      if "parser" in metadata:
          # To keep configs like config user_script_config
          parser.config_prefix = metadata["parser"]["config_prefix"]
      parser.parse(metadata["user_args"])
  
      log.debug("Updating parser for backward compatibility")
      metadata["parser"] = parser.get_state_dict()
      log.debug(pprint.pformat(metadata["parser"]))
  
      log.debug("Updating priors for backward compatibility")
      metadata["priors"] = dict(parser.priors)
      log.debug(pprint.pformat(metadata["priors"]))
  
file_path: orion/src/orion/core/utils/backward.py
imports: import copy
  import logging
  import pprint
  import orion.core
  from orion.core.io.orion_cmdline_parser import OrionCmdlineParser
  from orion.core.worker.trial import Trial
label_desc: Use image node_id 2 for calling a global function with example usage: populate_priors(metadata) without return types