code: def guess_n_streams(size, warn=False):
      # TODO : need description for parameter 'size'
      """
      Return a guess at a good number of streams.
  
      Parameters
      ----------
      warn : bool, optional
          If True, warn when a guess cannot be made (in which case we
          return 60 * 256).
  
      """
      # TODO: a smart way of choosing the number of streams, see #612.
      # Note that this code was moved out of `MRG_RandomStreams` so that it can
      # be easily accessed from tests, where we want to disable the warning.
      if isinstance(size, (tuple, list)) and all(
          [isinstance(i, integer_types) for i in size]
      ):
          # We can make a guess.
          r = 1
          for s in size:
              r *= s
          if r > 6:
              r = r // 6  # chosen as fastest for rbm_benchmark
  
          # The purpose of sampling from many streams is to be able to use
          # the GPU to its full capacity. It just wastes RAM and
          # stream-initialization time to allocate more streams than necessary
          # for the GPU.
          # XXX: This number is chosen to be good for 280 and 480 architectures,
          #      Better would be to use pycuda to query the number of
          #      processors on the GPU device,
          #      rather than guessing 60.
          return min(r, 60 * 256)
      else:
          if warn:
              warnings.warn(
                  (
                      "MRG_RandomStreams Can't determine #streams "
                      "from size (%s), guessing 60*256"
                  )
                  % str(size),
                  stacklevel=3,
              )
          return 60 * 256
  
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 6 for calling a global function with example usage: guess_n_streams(size, warn) and returns: min, unknown