code: def mf_random_optimiser_from_func_caller(
      func_caller,
      worker_manager,
      max_capital,
      mode="asy",
      options=None,
      reporter="default",
      *args,
      **kwargs,
  ):
      """Creates a MF EuclideanRandomOptimiser Object and optimises the function."""
      reporter = get_reporter(reporter)
      if isinstance(
          func_caller.domain, domains.EuclideanDomain
      ) and isinstance(
          func_caller.fidel_space, domains.EuclideanDomain
      ):
          optimiser_constructor = MFEuclideanRandomOptimiser
          dflt_list_of_options = mf_euclidean_random_optimiser_args
      elif isinstance(
          func_caller.domain, domains.CartesianProductDomain
      ) and isinstance(
          func_caller.fidel_space, domains.CartesianProductDomain
      ):
          optimiser_constructor = MFCPRandomOptimiser
          dflt_list_of_options = mf_cp_random_optimiser_args
      else:
          raise ValueError(
              (
                  "MF Random optimiser not implemented for (domain, fidel_space) "
                  + "of types (%s, %s)."
              )
              % (
                  type(func_caller.domain),
                  type(func_caller.fidel_space),
              )
          )
      # Load options
      options = load_options(
          dflt_list_of_options, partial_options=options
      )
      options.mode = mode
      # Create optimiser
      optimiser = optimiser_constructor(
          func_caller,
          worker_manager,
          options=options,
          reporter=reporter,
          *args,
          **kwargs,
      )
      # optimise and return
      return optimiser.optimise(max_capital)
  
imports: from argparse import Namespace
  import numpy
  from ..exd.cp_domain_utils import get_processed_func_from_raw_func_for_cp_domain, load_cp_domain_from_config_file
  from ..exd import domains
  from ..exd.exd_utils import get_euclidean_initial_qinfos, get_cp_domain_initial_qinfos
  from ..exd.exd_core import mf_exd_args
  from ..exd.experiment_caller import CPFunctionCaller
  from ..exd.cp_domain_utils import sample_from_cp_domain
  from ..exd.worker_manager import SyntheticWorkerManager
  from .blackbox_optimiser import BlackboxOptimiser, blackbox_opt_args, CalledMFOptimiserWithSFCaller
  from ..utils.option_handler import load_options
  from ..utils.reporters import get_reporter
  from ..utils.general_utils import map_to_bounds
label_desc: Use image node_id 4 for calling a global function with example usage: mf_random_optimiser_from_func_caller(func_caller, worker_manager, max_capital, mode, options, reporter) and returns: optimiser