code: def test_line_search_wolfe2_bounds(self):
      # See gh-7475
  
      # For this f and p, starting at a point on axis 0, the strong Wolfe
      # condition 2 is met if and only if the step length s satisfies
      # |x + s| <= c2 * |x|
      f = lambda x: jnp.dot(x, x)
      fp = lambda x: 2 * x
      p = jnp.array([1.0, 0.0])
  
      # Smallest s satisfying strong Wolfe conditions for these arguments is 30
      x = -60 * p
      c2 = 0.5
  
      res = line_search(f, x, p, c2=c2)
      s = res.a_k
      # s, _, _, _, _, _ = ls.line_search_wolfe2(f, fp, x, p, amax=30, c2=c2)
      self.assert_line_wolfe(x, p, s, f, fp)
      self.assertTrue(s >= 30.0)
  
      res = line_search(f, x, p, c2=c2, maxiter=5)
      self.assertTrue(res.failed)
  
imports: from absl.testing import absltest
  import scipy.optimize
  import jax
  from jax import grad
  from jax import config
  import jax.numpy
  import jax._src.test_util
  from jax._src.scipy.optimize.line_search import line_search
label_desc: Use image node_id 10 for calling the TestLineSearch obj's underlying member method code with example usage: obj.test_line_search_wolfe2_bounds() without return types