code: def grad(self, inputs, g):
      # the method that calculates the gradients - it actually returns the
      # vector-Jacobian product - g[0] is a vector of parameter values
      (theta,) = inputs  # our parameters
      out = [g[0] * self.score(theta)]
      return out
  
file_path: statsmodels/examples/python/statespace_sarimax_pymc3.py
imports: import matplotlib.pyplot
  import numpy
  import pandas
  import pymc3
  import statsmodels.api
  import theano
  import theano.tensor
  from pandas.plotting import register_matplotlib_converters
  from pandas_datareader.data import DataReader
label_desc: Use image node_id 3 for calling the Loglike obj's underlying member method code with example usage: obj.grad(inputs, g) and returns: out