code: def rand(random_state, *dn, **kw):
      """
      Random values in a given shape.
  
      Create a tensor of the given shape and populate it with
      random samples from a uniform distributionc
      over ``[0, 1)``.
  
      Parameters
      ----------
      d0, d1, ..., dn : int, optional
          The dimensions of the returned tensor, should all be positive.
          If no argument is given a single Python float is returned.
  
      Returns
      -------
      out : Tensor, shape ``(d0, d1, ..., dn)``
          Random values.
  
      See Also
      --------
      random
  
      Notes
      -----
      This is a convenience function. If you want an interface that
      takes a shape-tuple as the first argument, refer to
      mt.random.random_sample .
  
      Examples
      --------
      >>> import mars.tensor as mt
  
      >>> mt.random.rand(3, 2).execute()
      array([[ 0.14022471,  0.96360618],  #random
             [ 0.37601032,  0.25528411],  #random
             [ 0.49313049,  0.94909878]]) #random
      """
      if len(dn) == 1 and isinstance(dn[0], (tuple, list)):
          raise TypeError(
              "'tuple' object cannot be interpreted as an integer"
          )
      if "dtype" not in kw:
          kw["dtype"] = np.dtype("f8")
      chunk_size = kw.pop("chunk_size", None)
      seed = gen_random_seeds(1, random_state.to_numpy())[0]
      op = TensorRand(seed=seed, size=dn, **kw)
  
      for key in op.extra_params:
          if not key.startswith("_"):
              raise ValueError(
                  f"rand got unexpected key arguments {key}"
              )
  
      return op(chunk_size=chunk_size)
  
file_path: mars/mars/tensor/random/rand.py
imports: import numpy
  from ...None import opcodes
  from ..utils import gen_random_seeds
  from .core import TensorRandomOperandMixin, TensorSimpleRandomData
label_desc: Use image node_id 1 for calling a global function with example usage: rand(random_state) and returns: op