class_docstr: Class to handle the cost of evaluating the function.
  
  param cost_withGradients: function that returns the cost of evaluating the function and its gradient. By default
  no cost is used. Options are:
      - cost_withGradients is some pre-defined cost function. Should return numpy array as outputs.
      - cost_withGradients = 'evaluation_time'.
  
  .. Note:: if cost_withGradients = 'evaluation time' the evaluation time of the function is used to model a GP whose
  mean is used as cost.
code: def __init__(self, cost_withGradients):
      super(CostModel, self).__init__()
  
      self.cost_type = cost_withGradients
  
      # --- Set-up evaluation cost
      if self.cost_type is None:
          self.cost_withGradients = constant_cost_withGradients
          self.cost_type = "Constant cost"
  
      elif self.cost_type == "evaluation_time":
          self.cost_model = GPModel()
          self.cost_withGradients = self._cost_gp_withGradients
          self.num_updates = 0
      else:
          self.cost_withGradients = cost_withGradients
          self.cost_type = "User defined cost"
  
file_path: GPyOpt/GPyOpt/core/task/cost.py
imports: from ...models import GPModel
  import numpy
label_desc: Use image node_id 1 to create a new CostModel object from inherited base classes: object with example: obj = CostModel(cost_withGradients)