code: def maximise_with_method_on_euclidean_domain(
      method,
      obj,
      bounds,
      max_evals,
      dim,
      return_history=False,
      *args,
      **kwargs,
  ):
      """A wrapper for euclidean spaces which calls one of the functions below based on the
      method."""
      if method.lower().startswith("rand"):
          max_val, max_pt, history = random_maximise(
              obj, bounds, max_evals, return_history, *args, **kwargs
          )
      elif method.lower().startswith("direct") and dim <= 60:
          max_val, max_pt, history = direct_ft_maximise(
              obj, bounds, max_evals, return_history, *args, **kwargs
          )
      elif method.lower().startswith("pdoo") or (
          method.lower().startswith("direct") and dim > 60
      ):
          max_val, max_pt, history = pdoo_maximise(
              obj, bounds, max_evals, *args, **kwargs
          )
      else:
          raise ValueError(
              "Unknown maximisation method: %s." % (method)
          )
      if return_history:
          return max_val, max_pt, history
      else:
          return max_val, max_pt
  
imports: from argparse import Namespace
  import numpy
  from .cp_domain_utils import get_processed_from_raw_via_config, get_raw_from_processed_via_config, sample_from_cp_domain
  from ..utils.general_utils import map_to_bounds, flatten_list_of_lists
  from ..utils.oper_utils import direct_ft_maximise, latin_hc_sampling, pdoo_maximise, random_maximise
label_desc: Use image node_id 11 for calling a global function with example usage: maximise_with_method_on_euclidean_domain(method, obj, bounds, max_evals, dim, return_history) and returns: max_val,  max_pt,  history, max_val,  max_pt