code: def cp_ga_optimiser_from_raw_args(
      raw_func,
      domain_config_file,
      worker_manager,
      max_capital,
      mode="asy",
      single_mutation_ops=None,
      single_crossover_ops=None,
      options=None,
      reporter="default",
  ):
      """Optimise a function from raw args such as the raw function and the configuration
      file."""
      # pylint: disable=no-member
      cp_dom, orderings = load_cp_domain_from_config_file(
          domain_config_file
      )
      proc_func = get_processed_func_from_raw_func_for_cp_domain(
          raw_func,
          cp_dom,
          orderings.index_ordering,
          orderings.dim_ordering,
      )
      func_caller = CPFunctionCaller(
          proc_func,
          cp_dom,
          raw_func=raw_func,
          domain_orderings=orderings,
      )
      return cp_ga_optimiser_from_proc_args(
          func_caller,
          cp_dom,
          worker_manager,
          max_capital,
          mode,
          orderings,
          single_mutation_ops,
          single_crossover_ops,
          options,
          reporter,
      )
  
imports: from copy import copy
  import numpy
  from scipy.spatial.distance import cdist
  from ..exd.cp_domain_utils import get_processed_func_from_raw_func_for_cp_domain, load_cp_domain_from_config_file
  from ..exd.experiment_caller import ExperimentCaller, CPFunctionCaller
  from ..exd.worker_manager import SyntheticWorkerManager
  from ..exd.exd_utils import get_cp_domain_initial_qinfos
  from .ga_optimiser import GAOptimiser, ga_opt_args
  from ..utils.general_utils import project_to_bounds
  from ..utils.option_handler import load_options
label_desc: Use image node_id 12 for calling a global function with example usage: cp_ga_optimiser_from_raw_args(raw_func, domain_config_file, worker_manager, max_capital, mode, single_mutation_ops, single_crossover_ops, options, reporter) and returns: cp_ga_optimiser_from_proc_args