code: def test_scalar_search_wolfe2_regression(self):
      # Regression test for gh-12157
      # This phi has its minimum at alpha=4/3 ~ 1.333.
      def phi(alpha):
          if alpha < 1:
              return -3 * np.pi / 2 * (alpha - 1)
          else:
              return np.cos(3 * np.pi / 2 * alpha - np.pi)
  
      def derphi(alpha):
          if alpha < 1:
              return -3 * np.pi / 2
          else:
              return (
                  -3 * np.pi / 2 * np.sin(3 * np.pi / 2 * alpha - np.pi)
              )
  
      s, _, _, _ = ls.scalar_search_wolfe2(phi, derphi)
      # Without the fix in gh-13073, the scalar_search_wolfe2
      # returned s=2.0 instead.
      assert_(s < 1.5)
  
imports: from numpy.testing import assert_, assert_equal, assert_array_almost_equal, assert_array_almost_equal_nulp, assert_warns, suppress_warnings
  import scipy.optimize.linesearch
  from scipy.optimize.linesearch import LineSearchWarning
  import numpy
label_desc: Use image node_id 12 for calling the TestLineSearch obj's underlying member method code with example usage: obj.test_scalar_search_wolfe2_regression() and returns: unknown, np, unknown, unknown