code: def test_cost_withGradients_constant_cost(self):
      cost_model = CostModel(None)
  
      cost, d_cost = cost_model.cost_withGradients(np.array([2, 2]))
  
      self.assertTrue(np.isclose(cost, np.array([[1.0], [1.0]])).all())
      self.assertTrue(np.isclose(d_cost, np.array([0.0, 0.0])).all())
  
file_path: GPyOpt/GPyOpt/testing/core_tests/test_cost.py
imports: import unittest
  import numpy
  from GPyOpt.core.task import CostModel
  from GPyOpt.core.task.cost import constant_cost_withGradients
label_desc: Use image node_id 4 for calling the TestCostModel obj's underlying member method code with example usage: obj.test_cost_withGradients_constant_cost() without return types