code: def test_multMatVect():
      A1 = tensor.lmatrix("A1")
      s1 = tensor.ivector("s1")
      m1 = tensor.iscalar("m1")
      A2 = tensor.lmatrix("A2")
      s2 = tensor.ivector("s2")
      m2 = tensor.iscalar("m2")
  
      g0 = rng_mrg.DotModulo()(A1, s1, m1, A2, s2, m2)
      f0 = theano.function([A1, s1, m1, A2, s2, m2], g0)
  
      i32max = np.iinfo(np.int32).max
  
      A1 = np.random.randint(0, i32max, (3, 3)).astype("int64")
      s1 = np.random.randint(0, i32max, 3).astype("int32")
      m1 = np.asarray(np.random.randint(i32max), dtype="int32")
      A2 = np.random.randint(0, i32max, (3, 3)).astype("int64")
      s2 = np.random.randint(0, i32max, 3).astype("int32")
      m2 = np.asarray(np.random.randint(i32max), dtype="int32")
  
      f0.input_storage[0].storage[0] = A1
      f0.input_storage[1].storage[0] = s1
      f0.input_storage[2].storage[0] = m1
      f0.input_storage[3].storage[0] = A2
      f0.input_storage[4].storage[0] = s2
      f0.input_storage[5].storage[0] = m2
  
      r_a1 = rng_mrg.matVecModM(A1, s1, m1)
      r_a2 = rng_mrg.matVecModM(A2, s2, m2)
      f0.fn()
      r_b = f0.output_storage[0].value
  
      assert np.allclose(r_a1, r_b[:3])
      assert np.allclose(r_a2, r_b[3:])
  
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 20 for calling a global function with example usage: test_multMatVect() without return types