code: def test_warn_mixed_constraints(self):
      # warns about inefficiency of mixed equality/inequality constraints
      fun = (
          lambda x: (x[0] - 1) ** 2
          + (x[1] - 2.5) ** 2
          + (x[2] - 0.75) ** 2
      )
      cons = NonlinearConstraint(
          lambda x: [x[0] ** 2 - x[1], x[1] - x[2]],
          [1.1, 0.8],
          [1.1, 1.4],
      )
      bnds = ((0, None), (0, None), (0, None))
      with suppress_warnings() as sup:
          sup.filter(UserWarning, "delta_grad == 0.0")
          _assert_warns(
              OptimizeWarning,
              minimize,
              fun,
              (2, 0, 1),
              method=self.method,
              bounds=bnds,
              constraints=cons,
          )
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy.testing import assert_, assert_array_almost_equal, assert_allclose, assert_equal, TestCase
  import pytest
  from scipy._lib._numpy_compat import suppress_warnings
  from scipy.optimize import NonlinearConstraint, LinearConstraint, Bounds, OptimizeWarning, minimize, BFGS
  from .test_minimize_constrained import Maratos, HyperbolicIneq, Rosenbrock, IneqRosenbrock, EqIneqRosenbrock, BoundedRosenbrock, Elec
  from scipy._lib._numpy_compat import _assert_warns, suppress_warnings
label_desc: Use image node_id 2 for calling the TestNewToOldSLSQP obj's underlying member method code with example usage: obj.test_warn_mixed_constraints() without return types