code: def _optimization_function(
      weakself: tp.Any,
      objective_function: tp.Callable[[tp.ArrayLike], float],
  ) -> tp.Optional[tp.ArrayLike]:
      # pylint:disable=unused-argument, import-outside-toplevel
      from pymoo import optimize as pymoooptimize
  
      from pymoo.factory import get_algorithm as get_pymoo_algorithm
  
      # from pymoo.factory import get_reference_directions
  
      # reference direction code for when we want to use the other MOO optimizers in Pymoo
      # if self.algorithm in [
      #     "rnsga2",
      #     "nsga3",
      #     "unsga3",
      #     "rnsga3",
      #     "moead",
      #     "ctaea",
      # ]:  # algorithms that require reference points or reference directions
      #     the appropriate n_partitions must be looked into
      #     ref_dirs = get_reference_directions("das-dennis", self.num_objectives, n_partitions=12)
      #     algorithm = get_pymoo_algorithm(self.algorithm, ref_dirs)
      # else:
      algorithm = get_pymoo_algorithm(weakself.algorithm)
      problem = _create_pymoo_problem(
          weakself, objective_function, False
      )
      pymoooptimize.minimize(
          problem, algorithm, seed=weakself._initial_seed
      )
      return None
  
imports: import functools
  import math
  import warnings
  import weakref
  import numpy
  from scipy import optimize
  import nevergrad.common.typing
  from nevergrad.parametrization import parameter
  from nevergrad.common import errors
  from .None import base
  from .base import IntOrParameter
  from .None import recaster
label_desc: Use image node_id 3 for calling the _PymooBatchMinimizeBase obj's underlying member method code with example usage: obj._optimization_function(weakobjective_function) and returns: None