code: def test_retNone1(self):
      # Test that it is not ok to return None from op.grad()
      class retNone(gof.op.Op):
          __props__ = ()
  
          def make_node(self):
              inputs = [theano.tensor.vector()]
              outputs = [theano.tensor.vector()]
              return gof.Apply(self, inputs, outputs)
  
          def grad(self, inp, grads):
              (x,) = inp
              (gz,) = grads
              pass
  
      a = retNone().make_node()
      self.assertRaises(
          TypeError, grad_sources_inputs, [(a.out, one)], None
      )
  
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 1 for calling the testgrad_sources_inputs obj's underlying member method code with example usage: obj.test_retNone1() and returns: gof