code: def rosen_hess(x):
      """
      The Hessian matrix of the Rosenbrock function.
  
      Parameters
      ----------
      x : array_like
          1-D array of points at which the Hessian matrix is to be computed.
  
      Returns
      -------
      rosen_hess : ndarray
          The Hessian matrix of the Rosenbrock function at `x`.
  
      See Also
      --------
      rosen, rosen_der, rosen_hess_prod
  
      """
      x = atleast_1d(x)
      H = numpy.diag(-400 * x[:-1], 1) - numpy.diag(400 * x[:-1], -1)
      diagonal = numpy.zeros(len(x), dtype=x.dtype)
      diagonal[0] = 1200 * x[0] ** 2 - 400 * x[1] + 2
      diagonal[-1] = 200
      diagonal[1:-1] = 202 + 1200 * x[1:-1] ** 2 - 400 * x[2:]
      H = H + numpy.diag(diagonal)
      return H
  
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 6 for calling a global function with example usage: rosen_hess(x) and returns: H