code: def _endprint(x, flag, fval, maxfun, xtol, disp):
      if flag == 0:
          if disp > 1:
              print(
                  "\nOptimization terminated successfully;\n"
                  "The returned value satisfies the termination criteria\n"
                  "(using xtol = ",
                  xtol,
                  ")",
              )
      if flag == 1:
          if disp:
              print(
                  "\nMaximum number of function evaluations exceeded --- "
                  "increase maxfun argument.\n"
              )
      return
  
imports: from __future__ import division, print_function, absolute_import
  import warnings
  import sys
  import numpy
  from scipy._lib.six import callable, xrange
  from numpy import atleast_1d, eye, mgrid, argmin, zeros, shape, squeeze, vectorize, asarray, sqrt, Inf, asfarray, isinf
  import numpy
  from .linesearch import line_search_wolfe1, line_search_wolfe2, line_search_wolfe2, LineSearchWarning
  from scipy._lib._util import getargspec_no_self
label_desc: Use image node_id 32 for calling a global function with example usage: _endprint(x, flag, fval, maxfun, xtol, disp) without return types