@tf.custom_gradient<EOL>def _prevent_2nd_derivative(x):
def grad(dy):<EOL><INDENT>return array_ops.prevent_gradient(<EOL>dy, message="<STR_LIT>")<EOL><DEDENT>return tf.identity(x), grad<EOL>
Disables computation of the second derivatives for a tensor.

    NB: you need to apply a non-identity function to the output tensor for the
    exception to be raised.

    Arguments:
      x: A tensor.

    Returns:
      A tensor with the same value and the same derivative as x, but that raises
      LookupError when trying to compute the second derivatives.