class_docstr: Base class for acquisition functions in Bayesian Optimization
  
  :param model: GPyOpt class of model
  :param space: GPyOpt class of domain
  :param optimizer: optimizer of the acquisition. Should be a GPyOpt optimizer
docstr: Optimizes the acquisition function (uses a flag from the model to use gradients or not).
docstr_tok: ["Optimizes","the","acquisition","function","(","uses","a","flag","from","the","model","to","use","gradients","or","not",")","."]
code: def optimize(self, duplicate_manager=None):
      """
      Optimizes the acquisition function (uses a flag from the model to use gradients or not).
      """
      if not self.analytical_gradient_acq:
          out = self.optimizer.optimize(
              f=self.acquisition_function,
              duplicate_manager=duplicate_manager,
          )
      else:
          out = self.optimizer.optimize(
              f=self.acquisition_function,
              f_df=self.acquisition_function_withGradients,
              duplicate_manager=duplicate_manager,
          )
      return out
  
file_path: GPyOpt/GPyOpt/acquisitions/base.py
imports: from ..core.task.cost import constant_cost_withGradients
label_desc: Use image node_id 5 for calling the AcquisitionBase obj's underlying member method code with example usage: obj.optimize(duplicate_manager) and returns: out