code: def test_lower_less_than_upper():
      def target_function(x, y):
          return np.cos(2 * x) * np.cos(y) + np.sin(x)
  
      def constraint_function_2_dim(x, y):
          return np.array(
              [
                  -np.cos(x) * np.cos(y) + np.sin(x) * np.sin(y),
                  -np.cos(x) * np.cos(-y) + np.sin(x) * np.sin(-y),
              ]
          )
  
      constraint_limit_lower = np.array([0.6, -np.inf])
      constraint_limit_upper = np.array([0.3, 0.6])
  
      conmod = NonlinearConstraint(
          constraint_function_2_dim,
          constraint_limit_lower,
          constraint_limit_upper,
      )
      pbounds = {"x": (0, 6), "y": (0, 6)}
  
      with raises(ValueError):
          optimizer = BayesianOptimization(
              f=target_function,
              constraint=conmod,
              pbounds=pbounds,
              verbose=0,
              random_state=1,
          )
  
file_path: BayesianOptimization/tests/test_constraint.py
imports: import numpy
  from bayes_opt import BayesianOptimization
  from pytest import approx, raises
  from scipy.optimize import NonlinearConstraint
label_desc: Use image node_id 6 for calling a global function with example usage: test_lower_less_than_upper() and returns: unknown, np