code: def rosenbrock(x: np.ndarray) -> float:
      x_m_1 = x[:-1] - 1
      x_diff = x[:-1] ** 2 - x[1:]
      return float(100 * x_diff.dot(x_diff) + x_m_1.dot(x_m_1))
  
imports: from typing import List, Callable, Optional
  from math import exp, sqrt
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: rosenbrock(x) and returns: float