code: def test_estimate_feasible_volume(self):
      for dtype in (torch.float, torch.double):
          for samples in (
              torch.zeros(1, 2, 1, device=self.device, dtype=dtype),
              torch.ones(1, 1, 1, device=self.device, dtype=dtype),
          ):
              mm = MockModel(MockPosterior(samples=samples))
              bounds = torch.ones((2, 1))
              outcome_constraints = [lambda y: y[..., 0] - 0.5]
  
              p_linear, p_outcome = estimate_feasible_volume(
                  bounds=bounds,
                  model=mm,
                  outcome_constraints=outcome_constraints,
                  nsample_feature=2,
                  nsample_outcome=1,
                  dtype=dtype,
              )
  
              self.assertEqual(p_linear, 1.0)
              self.assertEqual(p_outcome, 1.0 - samples[0, 0].item())
  
              p_linear, p_outcome = estimate_feasible_volume(
                  bounds=bounds,
                  model=mm,
                  outcome_constraints=None,
                  nsample_feature=2,
                  nsample_outcome=1,
                  dtype=dtype,
              )
              self.assertEqual(p_linear, 1.0)
              self.assertEqual(p_outcome, 1.0)
  
file_path: botorch/test/utils/test_feasible_volume.py
imports: import torch
  from botorch.utils.feasible_volume import estimate_feasible_volume, get_feasible_samples, get_outcome_feasibility_probability
  from botorch.utils.testing import BotorchTestCase, MockModel, MockPosterior
label_desc: Use image node_id 3 for calling the TestFeasibleVolumeEstimates obj's underlying member method code with example usage: obj.test_estimate_feasible_volume() without return types