code: def test_grad_grad_cubic(self):
      # test the gradient on a bigger graph constructed using the gradient
  
      def output(x, A):
          orig_cost = theano.tensor.dot(x * x, theano.tensor.dot(A, x))
          return theano.gradient.grad(orig_cost, x)
  
      rng = np.random.RandomState([2012, 8, 28])
  
      vx = rng.randn(2)
      vA = rng.randn(2, 2)
  
      theano.tests.unittest_tools.verify_grad(output, [vx, vA])
  
imports: from __future__ import absolute_import, print_function, division
  from collections import OrderedDict
  import unittest
  import numpy
  from six.moves import xrange
  import theano
  from theano import gof, change_flags
  from theano.compat import izip
  from theano.tests import unittest_tools
  from theano import gradient
  from theano import config
  from theano.gof.null_type import NullType
  from theano.sandbox.rng_mrg import MRG_RandomStreams
label_desc: Use image node_id 11 for calling the test_grad obj's underlying member method code with example usage: obj.test_grad_grad_cubic() and returns: theano