code: def test_get_constants(self):
      tkwargs = {"device": self.device, "dtype": torch.float16}
      const = constants.get_constants(0.123, **tkwargs)
      self.assertEqual(const, 0.123)
      self.assertEqual(const.device.type, tkwargs["device"].type)
      self.assertEqual(const.dtype, tkwargs["dtype"])
  
      try:  # test in-place modification
          const.add_(1)
          const2 = constants.get_constants(0.123, **tkwargs)
          self.assertEqual(const2, 1.123)
      finally:
          const.sub_(1)
  
      # Test fetching of multiple constants
      const_tuple = constants.get_constants(values=(0, 1, 2), **tkwargs)
      self.assertIsInstance(const_tuple, tuple)
      self.assertEqual(len(const_tuple), 3)
      for i, const in enumerate(const_tuple):
          self.assertEqual(const, i)
  
file_path: botorch/test/utils/test_constants.py
imports: from __future__ import annotations
  from unittest.mock import patch
  import torch
  from botorch.utils import constants
  from botorch.utils.testing import BotorchTestCase
label_desc: Use image node_id 1 for calling the TestConstants obj's underlying member method code with example usage: obj.test_get_constants() without return types