code: def assert_armijo(s, phi, c1=1e-4, err_msg=""):
      """
      Check that Armijo condition applies
      """
      phi1 = phi(s)
      phi0 = phi(0)
      msg = "s = %s; phi(0) = %s; phi(s) = %s; %s" % (
          s,
          phi0,
          phi1,
          err_msg,
      )
      assert_(phi1 <= (1 - c1 * s) * phi0, msg)
  
imports: from __future__ import division, print_function, absolute_import
  from numpy.testing import assert_, assert_equal, assert_array_almost_equal, assert_array_almost_equal_nulp, assert_warns
  from scipy._lib._numpy_compat import suppress_warnings
  import scipy.optimize.linesearch
  from scipy.optimize.linesearch import LineSearchWarning
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: assert_armijo(s, phi, c1, err_msg) without return types