code: def multMatVect(v, A, m1, B, m2):
      # TODO : need description for parameter and return
      """
      Multiply the first half of v by A with a modulo of m1 and the second half
      by B with a modulo of m2.
  
      Notes
      -----
      The parameters of dot_modulo are passed implicitly because passing them
      explicitly takes more time than running the function's C-code.
  
      """
      if multMatVect.dot_modulo is None:
          A_sym = tensor.lmatrix("A")
          s_sym = tensor.ivector("s")
          m_sym = tensor.iscalar("m")
          A2_sym = tensor.lmatrix("A2")
          s2_sym = tensor.ivector("s2")
          m2_sym = tensor.iscalar("m2")
          o = DotModulo()(A_sym, s_sym, m_sym, A2_sym, s2_sym, m2_sym)
          multMatVect.dot_modulo = function(
              [A_sym, s_sym, m_sym, A2_sym, s2_sym, m2_sym],
              o,
              profile=False,
          )
  
      # This way of calling the Theano fct is done to bypass Theano overhead.
      f = multMatVect.dot_modulo
      f.input_storage[0].storage[0] = A
      f.input_storage[1].storage[0] = v[:3]
      f.input_storage[2].storage[0] = m1
      f.input_storage[3].storage[0] = B
      f.input_storage[4].storage[0] = v[3:]
      f.input_storage[5].storage[0] = m2
      f.fn()
      r = f.output_storage[0].storage[0]
  
      return r
  
imports: from __future__ import absolute_import, print_function, division
  import warnings
  import numpy
  from six import integer_types, string_types
  from six.moves import xrange
  import theano
  from theano import Op, Apply, shared, config, Variable
  from theano import gradient, function
  from theano.gradient import undefined_grad
  from theano import tensor
  from theano.tensor import TensorType, as_tensor_variable, get_vector_length, cast, opt, scal
  from theano.compile import optdb
  from theano.gof import local_optimizer, ParamsType
  from theano.scalar import bool, int32
  from .None import multinomial
label_desc: Use image node_id 2 for calling a global function with example usage: multMatVect(v, A, m1, B, m2) and returns: r