code: def test_nonlinear_constraint_is_feasible(self):
      def nlc(x):
          return 4 - x.sum()
  
      self.assertTrue(
          nonlinear_constraint_is_feasible(
              nlc,
              True,
              torch.tensor(
                  [[[1.5, 1.5], [1.5, 1.5]]], device=self.device
              ),
          )
      )
      self.assertFalse(
          nonlinear_constraint_is_feasible(
              nlc,
              True,
              torch.tensor(
                  [[[1.5, 1.5], [1.5, 1.5], [3.5, 1.5]]],
                  device=self.device,
              ),
          )
      )
      self.assertFalse(
          nonlinear_constraint_is_feasible(
              nlc,
              True,
              torch.tensor(
                  [[[1.5, 1.5], [1.5, 1.5]], [[1.5, 1.5], [1.5, 3.5]]],
                  device=self.device,
              ),
          )
      )
      self.assertTrue(
          nonlinear_constraint_is_feasible(
              nlc,
              False,
              torch.tensor(
                  [[[1.0, 1.0], [1.0, 1.0]]], device=self.device
              ),
          )
      )
      self.assertTrue(
          nonlinear_constraint_is_feasible(
              nlc,
              False,
              torch.tensor(
                  [[[1.0, 1.0], [1.0, 1.0]], [[1.0, 1.0], [1.0, 1.0]]],
                  device=self.device,
              ),
          )
      )
      self.assertFalse(
          nonlinear_constraint_is_feasible(
              nlc,
              False,
              torch.tensor(
                  [[[1.5, 1.5], [1.5, 1.5]]], device=self.device
              ),
          )
      )
      self.assertFalse(
          nonlinear_constraint_is_feasible(
              nlc,
              False,
              torch.tensor(
                  [[[1.0, 1.0], [1.0, 1.0]], [[1.5, 1.5], [1.5, 1.5]]],
                  device=self.device,
              ),
          )
      )
  
imports: from itertools import product
  from typing import Callable
  import numpy
  import torch
  from botorch.exceptions.errors import CandidateGenerationError, UnsupportedError
  from botorch.optim.parameter_constraints import _arrayify, _generate_unfixed_lin_constraints, _generate_unfixed_nonlin_constraints, _make_linear_constraints, _make_nonlinear_constraints, eval_lin_constraint, lin_constraint_jac, make_scipy_bounds, make_scipy_linear_constraints, make_scipy_nonlinear_inequality_constraints, nonlinear_constraint_is_feasible
  from botorch.utils.testing import BotorchTestCase
  from scipy.optimize import Bounds
label_desc: Use image node_id 9 for calling the TestParameterConstraints obj's underlying member method code with example usage: obj.test_nonlinear_constraint_is_feasible() and returns: unknown