code: def randint(upper, rng=None, size=()):
      # this is tricky because numpy doesn't support
      # upper being a list of len size[0]
      if isinstance(upper, (list, tuple)):
          if isinstance(size, int):
              assert len(upper) == size
              return np.asarray([rng.randint(uu) for uu in upper])
          elif len(size) == 1:
              assert len(upper) == size[0]
              return np.asarray([rng.randint(uu) for uu in upper])
      return rng.randint(upper, size=size)
  
imports: from __future__ import print_function
  from __future__ import division
  from builtins import range
  from past.utils import old_div
  import sys
  import numpy
  from .base import scope, as_apply, dfs, rec_eval, clone
label_desc: Use image node_id 12 for calling a global function with example usage: randint(upper, rng, size) and returns: rng, np, np