code: def randomstate_constructor(
      value, name=None, strict=False, allow_downcast=None, borrow=False
  ):
      """
      SharedVariable Constructor for RandomState.
  
      """
      if not isinstance(value, np.random.RandomState):
          raise TypeError
      if not borrow:
          value = copy.deepcopy(value)
      return RandomStateSharedVariable(
          type=raw_random.random_state_type,
          value=value,
          name=name,
          strict=strict,
          allow_downcast=allow_downcast,
      )
  
file_path: Theano/theano/tensor/shared_randomstreams.py
imports: from __future__ import absolute_import, print_function, division
  import copy
  import numpy
  from theano.compile.sharedvalue import SharedVariable, shared_constructor, shared
  from theano.tensor import raw_random
label_desc: Use image node_id 1 for calling a global function with example usage: randomstate_constructor(value, name, strict, allow_downcast, borrow) and returns: RandomStateSharedVariable