code: def test_minimize_constraint_violation(self):
      np.random.seed(1234)
      pb = np.random.rand(10, 10)
      spread = np.random.rand(10)
  
      def p(w):
          return pb.dot(w)
  
      def f(w):
          return -(w * spread).sum()
  
      def c1(w):
          return 500 - abs(p(w)).sum()
  
      def c2(w):
          return 5 - abs(p(w).sum())
  
      def c3(w):
          return 5 - abs(p(w)).max()
  
      cons = (
          {"type": "ineq", "fun": c1},
          {"type": "ineq", "fun": c2},
          {"type": "ineq", "fun": c3},
      )
      w0 = np.zeros((10, 1))
      sol = minimize(
          f,
          w0,
          method="cobyla",
          constraints=cons,
          options={"catol": 1e-6},
      )
      assert_(sol.maxcv > 1e-6)
      assert_(not sol.success)
  
file_path: catboost/contrib/python/scipy/py3/scipy/optimize/tests/test_cobyla.py
imports: import math
  import numpy
  from numpy.testing import assert_allclose, assert_
  from scipy.optimize import fmin_cobyla, minimize
label_desc: Use image node_id 7 for calling the TestCobyla obj's underlying member method code with example usage: obj.test_minimize_constraint_violation() and returns: pb, unknown, unknown, unknown, unknown