code: def test_init(self):
      with self.assertRaises(TypeError):
          NonAbstractSampler()
      # Current args.
      sampler = NonAbstractSampler(
          sample_shape=torch.Size([4]), seed=1234
      )
      self.assertEqual(sampler.sample_shape, torch.Size([4]))
      self.assertEqual(sampler.seed, 1234)
      self.assertIsNone(sampler.base_samples)
      # Default seed.
      sampler = NonAbstractSampler(sample_shape=torch.Size([4]))
      self.assertIsInstance(sampler.seed, int)
      # Deprecated args & error handling.
      with self.assertWarnsRegex(
          DeprecationWarning, "positional argument"
      ):
          NonAbstractSampler(4)
      with self.assertRaisesRegex(InputDataError, "sample_shape"):
          NonAbstractSampler(4.5)
      with self.assertWarnsRegex(DeprecationWarning, "resample"):
          NonAbstractSampler(
              sample_shape=torch.Size([4]), resample=False
          )
      with self.assertRaisesRegex(RuntimeError, "StochasticSampler"):
          NonAbstractSampler(
              sample_shape=torch.Size([4]), resample=True
          )
      with self.assertWarnsRegex(DeprecationWarning, "collapse_batch"):
          NonAbstractSampler(
              sample_shape=torch.Size([4]), collapse_batch_dims=True
          )
      with self.assertRaisesRegex(RuntimeError, "ForkedRNGSampler"):
          NonAbstractSampler(
              sample_shape=torch.Size([4]), collapse_batch_dims=False
          )
      with self.assertRaisesRegex(RuntimeError, "unknown argument"):
          NonAbstractSampler(
              sample_shape=torch.Size([4]), dummy_arg=True
          )
  
file_path: botorch/test/sampling/test_base.py
imports: import torch
  from botorch.exceptions.errors import InputDataError
  from botorch.sampling.base import MCSampler
  from botorch.utils.testing import BotorchTestCase, MockPosterior
label_desc: Use image node_id 2 for calling the TestBaseMCSampler obj's underlying member method code with example usage: obj.test_init() without return types