class_docstr: Class for a Thompson batch method. Elements are selected iteratively using the current acquistion function but exploring the models
  by using Thompson sampling
  
  :param acquisition: acquisition function to be used to compute the batch.
  :param batch size: the number of elements in the batch.
class_docstr_tok: ["Class","for","a","Thompson","batch","method",".","Elements","are","selected","iteratively","using","the","current","acquistion","function","but","exploring","the","models","by","using","Thompson","sampling",":","param","acquisition",":","acquisition","function","to","be","used","to","compute","the","batch",".",":","param","batch","size",":","the","number","of","elements","in","the","batch","."]
code: def optimize_anchor_point(
      self, a, duplicate_manager=None, context_manager=None
  ):
      ### --- Update the bounds of the default optimizer according to the context_manager
      if context_manager:
          bounds = self.context_manager.noncontext_bounds
      else:
          bounds = self.space.get_bounds()
  
      self.local_optimizer = choose_optimizer(
          self.optimizer_name, bounds
      )
  
      ### --- Run the local optimizer
      x, _ = apply_optimizer(
          self.local_optimizer,
          a,
          f=self.f,
          df=None,
          f_df=self.f_df,
          duplicate_manager=duplicate_manager,
          context_manager=self.context_manager,
          space=self.space,
      )
      return self.space.round_optimum(x)
  
file_path: GPyOpt/GPyOpt/core/evaluators/batch_thompson.py
imports: from .base import SamplingBasedBatchEvaluator
  from ...optimization.anchor_points_generator import ThompsonSamplingAnchorPointsGenerator
  from ...optimization.optimizer import OptLbfgs, apply_optimizer, choose_optimizer
  import numpy
label_desc: Use image node_id 4 for calling the ThompsonBatch obj's underlying member method code with example usage: obj.optimize_anchor_point(a, duplicate_manager, context_manager) and returns: self