code: def Rp(v):
      """Gradient"""
      result = 2 * (A * v - R(v) * B * v) / dot(v.T, B * v)
      # print "Rp: ", result
      return result
  
file_path: statsmodels/statsmodels/sandbox/mle.py
imports: import numpy
  from numpy import dot, outer, random
  from scipy import io, linalg, optimize
  from scipy.sparse import eye
  import matplotlib.pyplot
label_desc: Use image node_id 2 for calling a global function with example usage: Rp(v) and returns: result