code: def test_gradient_scan():
      # Test for a crash when using MRG inside scan and taking the gradient
      # See https://groups.google.com/d/msg/theano-dev/UbcYyU5m-M8/UO9UgXqnQP0J
      theano_rng = MRG_RandomStreams(10)
      w = theano.shared(np.ones(1, dtype="float32"))
  
      def one_step(x):
          return x + theano_rng.uniform((1,), dtype="float32") * w
  
      x = tensor.vector(dtype="float32")
      values, updates = theano.scan(
          one_step, outputs_info=x, n_steps=10
      )
      gw = theano.grad(tensor.sum(values[-1]), w)
      f = theano.function([x], gw)
      f(np.arange(1, dtype="float32"))
  
imports: from __future__ import absolute_import, print_function, division
  import os
  import sys
  import time
  import unittest
  from nose.tools import assert_raises
  import numpy
  from six.moves import xrange
  import theano
  from theano import change_flags, config, tensor
  from theano.sandbox import rng_mrg
  from theano.sandbox.rng_mrg import MRG_RandomStreams
  from theano.tests import unittest_tools
  from theano.tests.unittest_tools import attr
label_desc: Use image node_id 19 for calling a global function with example usage: test_gradient_scan() and returns: unknown