code: def test_known_grads_integers():
      # Tests that known_grads works on integers
  
      x = theano.tensor.iscalar()
      g_expected = theano.tensor.scalar()
  
      g_grad = theano.gradient.grad(
          cost=None, known_grads={x: g_expected}, wrt=x
      )
  
      f = theano.function([g_expected], g_grad)
  
      x = -3
      gv = np.cast[theano.config.floatX](0.6)
  
      g_actual = f(gv)
  
      assert np.allclose(g_actual, gv)
  
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 4 for calling a global function with example usage: test_known_grads_integers() without return types