code: def nonlinear_constraint_is_feasible(
      nonlinear_inequality_constraint: Callable,
      is_intrapoint: bool,
      x: Tensor,
  ) -> bool:
      """Checks if a nonlinear inequality constraint is fulfilled.
  
      Args:
          nonlinear_inequality_constraint: Callable to evaluate the
              constraint.
          intra: If True, the constraint is an intra-point constraint that
              is applied pointwise and is broadcasted over the q-batch. Else, the
              constraint has to evaluated over the whole q-batch and is a an
              inter-point constraint.
          x: Tensor of shape (b x q x d).
  
      Returns:
          bool: True if the constraint is fulfilled, else False.
      """
  
      def check_x(x: Tensor) -> bool:
          return (
              _arrayify(nonlinear_inequality_constraint(x)).item()
              >= NLC_TOL
          )
  
      for x_ in x:
          if is_intrapoint:
              if not all(check_x(x__) for x__ in x_):
                  return False
          else:
              if not check_x(x_):
                  return False
      return True
  
imports: from __future__ import annotations
  from functools import partial
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from botorch.exceptions.errors import CandidateGenerationError, UnsupportedError
  from scipy.optimize import Bounds
  from torch import Tensor
label_desc: Use image node_id 13 for calling a global function with example usage: nonlinear_constraint_is_feasible(nonlinear_inequality_constraint, is_intrapoint, x) and returns: True, unknown, False, False