code: def test_expand_ref_point(self):
      ref_point = torch.tensor([1.0, 2.0], device=self.device)
      for dtype in (torch.float, torch.double):
          ref_point = ref_point.to(dtype=dtype)
          # test non-batch
          self.assertTrue(
              torch.equal(
                  _expand_ref_point(
                      ref_point, batch_shape=torch.Size([])
                  ),
                  ref_point,
              )
          )
          self.assertTrue(
              torch.equal(
                  _expand_ref_point(
                      ref_point, batch_shape=torch.Size([3])
                  ),
                  ref_point.unsqueeze(0).expand(3, -1),
              )
          )
          # test ref point with wrong shape batch_shape
          with self.assertRaises(BotorchTensorDimensionError):
              _expand_ref_point(
                  ref_point.unsqueeze(0), batch_shape=torch.Size([])
              )
          with self.assertRaises(BotorchTensorDimensionError):
              _expand_ref_point(
                  ref_point.unsqueeze(0).expand(3, -1), torch.Size([2])
              )
  
file_path: botorch/test/utils/multi_objective/box_decompositions/test_utils.py
imports: from __future__ import annotations
  import torch
  from botorch.exceptions.errors import BotorchTensorDimensionError, UnsupportedError
  from botorch.utils.multi_objective.box_decompositions.utils import _expand_ref_point, _pad_batch_pareto_frontier, compute_dominated_hypercell_bounds_2d, compute_local_upper_bounds, compute_non_dominated_hypercell_bounds_2d, get_partition_bounds, update_local_upper_bounds_incremental
  from botorch.utils.testing import BotorchTestCase
label_desc: Use image node_id 1 for calling the TestUtils obj's underlying member method code with example usage: obj.test_expand_ref_point() without return types