code: def test_cost_gp_defined_cost(self):
      cost_model = CostModel(5)
  
      with self.assertRaises(AttributeError):
          time_cost = cost_model._cost_gp(
              np.array([[3, 0], [4, 1], [5, 1]])
          )
  
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 3 for calling the TestCostModel obj's underlying member method code with example usage: obj.test_cost_gp_defined_cost() without return types