code: def test_fixed_cost_model(self):
      for dtype in (torch.float, torch.double):
          for batch_shape in ([], [2]):
              X = torch.rand(
                  *batch_shape, 3, 2, device=self.device, dtype=dtype
              )
              # test default parameters
              fixed_cost = fixed_cost = torch.tensor(
                  [1.0, 2.0], dtype=dtype, device=self.device
              )
              model = FixedCostModel(fixed_cost=fixed_cost)
              self.assertEqual(model.num_outputs, 2)
              self.assertTrue(torch.equal(model.fixed_cost, fixed_cost))
              cost = model(X)
              cost_exp = fixed_cost.view(
                  [1] * (X.ndim - 1) + [2]
              ).expand(*X.shape[:-1], 2)
              self.assertAllClose(cost, cost_exp)
  
file_path: botorch/test/models/test_cost.py
imports: from random import random
  import torch
  from botorch.models.cost import AffineFidelityCostModel, FixedCostModel
  from botorch.utils.testing import BotorchTestCase
label_desc: Use image node_id 2 for calling the TestCostModels obj's underlying member method code with example usage: obj.test_fixed_cost_model() without return types