code: def test_find_active_constraints(self):
      lb = np.array([0.0, -10.0, 1.0])
      ub = np.array([1.0, 0.0, 100.0])
  
      x = np.array([0.5, -5.0, 2.0])
      active = find_active_constraints(x, lb, ub)
      assert_equal(active, [0, 0, 0])
  
      x = np.array([0.0, 0.0, 10.0])
      active = find_active_constraints(x, lb, ub)
      assert_equal(active, [-1, 1, 0])
  
      active = find_active_constraints(x, lb, ub, rtol=0)
      assert_equal(active, [-1, 1, 0])
  
      x = np.array([1e-9, -1e-8, 100 - 1e-9])
      active = find_active_constraints(x, lb, ub)
      assert_equal(active, [0, 0, 1])
  
      active = find_active_constraints(x, lb, ub, rtol=1.5e-9)
      assert_equal(active, [-1, 0, 1])
  
      lb = np.array([1.0, -np.inf, -np.inf])
      ub = np.array([np.inf, 10.0, np.inf])
  
      x = np.ones(3)
      active = find_active_constraints(x, lb, ub)
      assert_equal(active, [-1, 0, 0])
  
      # Handles out-of-bound cases.
      x = np.array([0.0, 11.0, 0.0])
      active = find_active_constraints(x, lb, ub)
      assert_equal(active, [-1, 1, 0])
  
      active = find_active_constraints(x, lb, ub, rtol=0)
      assert_equal(active, [-1, 1, 0])
  
file_path: scipy/scipy/optimize/tests/test_lsq_common.py
imports: from numpy.testing import assert_, assert_allclose, assert_equal
  from pytest import raises
  import numpy
  from scipy.optimize._lsq.common import step_size_to_bound, find_active_constraints, make_strictly_feasible, CL_scaling_vector, intersect_trust_region, build_quadratic_1d, minimize_quadratic_1d, evaluate_quadratic, reflective_transformation, left_multiplied_operator, right_multiplied_operator
label_desc: Use image node_id 2 for calling the TestBounds obj's underlying member method code with example usage: obj.test_find_active_constraints() without return types