code: def test_random():
      arr = rand(2, 3)
  
      assert arr.dtype is not None
  
      arr = tile(beta(1, 2, chunk_size=2))
  
      assert arr.shape == ()
      assert len(arr.chunks) == 1
      assert arr.chunks[0].shape == ()
      assert arr.chunks[0].op.dtype == np.dtype("f8")
  
      arr = tile(beta([1, 2], [3, 4], chunk_size=2))
  
      assert arr.shape == (2,)
      assert len(arr.chunks) == 1
      assert arr.chunks[0].shape == (2,)
      assert arr.chunks[0].op.dtype == np.dtype("f8")
  
      arr = tile(
          beta(
              [[2, 3]],
              from_ndarray([[4, 6], [5, 2]], chunk_size=2),
              chunk_size=1,
              size=(3, 2, 2),
          )
      )
  
      assert arr.shape == (3, 2, 2)
      assert len(arr.chunks) == 12
      assert arr.chunks[0].op.dtype == np.dtype("f8")
  
file_path: mars/mars/tensor/random/tests/test_random.py
imports: import numpy
  import pytest
  from ....core import tile
  from ....serialization import serialize, deserialize
  from ....serialization.serializables import Serializable
  from ...datasource import tensor
  from ..None import beta, rand, choice, multivariate_normal, randint, randn, permutation, TensorPermutation, shuffle, RandomState
  from ..core import RandomStateField
label_desc: Use image node_id 2 for calling a global function with example usage: test_random() without return types