code: def get_custom_dsat_exp_conf_from_args(
      args: argparse.Namespace,
  ) -> Dict[str, Any]:
      """
      Helper function which alters the user-submitted configuration and args into a configuration
      for the DS AT custom searchers.
      """
      exp_config = _utils.get_dict_from_yaml_or_json_path(
          args.config_path
      )  # add the search runner's experiment id to the description of the corresonding Trial
      additional_description = f"(#{args.experiment_id}) generated"
      existing_description = exp_config.get("description")
      if existing_description is not None:
          exp_config[
              "description"
          ] = f"{additional_description} - {exp_config['description']}"
      else:
          exp_config["description"] = additional_description
  
      # Overwrite the searcher section.
      exp_config["searcher"] = {
          "name": "custom",
          "metric": args.metric,
          "smaller_is_better": _utils.smaller_is_better(args.metric),
      }
      # Add all necessary autotuning keys from defaults and user-supplied args.
      autotuning_config = _defaults.AUTOTUNING_DICT
      autotuning_config["autotuning"][
          "start_profile_step"
      ] = args.start_profile_step
      autotuning_config["autotuning"][
          "end_profile_step"
      ] = args.end_profile_step
  
      exp_config["hyperparameters"] = merge_dicts(
          exp_config["hyperparameters"],
          {_defaults.OVERWRITE_KEY: autotuning_config},
      )
      # Add an internal key to the HP dict which enables the DSAT code path for Trial classes.
      exp_config["hyperparameters"][_defaults.USE_DSAT_MODE_KEY] = True
  
      return exp_config
  
file_path: determined/harness/determined/pytorch/dsat/_run_dsat.py
imports: import argparse
  import logging
  import os
  import pathlib
  import pickle
  from typing import Any, Dict, Type
  import determined
  from determined import searcher
  from determined.pytorch.dsat import ASHADSATSearchMethod, BaseDSATSearchMethod, BinarySearchDSATSearchMethod, RandomDSATSearchMethod, _defaults, _TestDSATSearchMethod, _utils
  from determined.util import merge_dicts
label_desc: Use image node_id 2 for calling a global function with example usage: get_custom_dsat_exp_conf_from_args(args) and returns: exp_config