code: def _rosenbrock(x):
      """See https://en.wikipedia.org/wiki/Rosenbrock_function."""
      term1 = 100 * tf.reduce_sum(tf.square(x[1:] - tf.square(x[:-1])))
      term2 = tf.reduce_sum(tf.square(1 - x[:-1]))
      return term1 + term2
  
imports: import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 2 for calling a global function with example usage: _rosenbrock(x) and returns: unknown