code: def test_stack():
      raw_arrs = [ones((3, 4), chunk_size=2) for _ in range(10)]
      arr2 = stack(raw_arrs, axis=0)
  
      assert arr2.shape == (10, 3, 4)
  
      arr2 = tile(arr2)
      assert arr2.nsplits == ((1,) * 10, (2, 1), (2, 2))
  
      arr3 = stack(raw_arrs, axis=1)
  
      assert arr3.shape == (3, 10, 4)
  
      arr3 = tile(arr3)
      assert arr3.nsplits == ((2, 1), (1,) * 10, (2, 2))
  
      arr4 = stack(raw_arrs, axis=2)
  
      assert arr4.shape == (3, 4, 10)
  
      arr4 = tile(arr4)
      assert arr4.nsplits == ((2, 1), (2, 2), (1,) * 10)
  
      with pytest.raises(ValueError):
          raw_arrs2 = [
              ones((3, 4), chunk_size=2),
              ones((4, 3), chunk_size=2),
          ]
          stack(raw_arrs2)
  
      with pytest.raises(np.AxisError):
          stack(raw_arrs, axis=3)
  
      arr5 = tile(stack(raw_arrs, -1))
      assert arr5.nsplits == ((2, 1), (2, 2), (1,) * 10)
  
      arr6 = tile(stack(raw_arrs, -3))
      assert arr6.nsplits == ((1,) * 10, (2, 1), (2, 2))
  
      with pytest.raises(np.AxisError):
          stack(raw_arrs, axis=-4)
  
      with pytest.raises(TypeError):
          stack(raw_arrs, out=1)
  
      with pytest.raises(ValueError):
          stack(raw_arrs, empty((1, 10, 3, 4)))
  
imports: import numpy
  import pytest
  from ....core import tile
  from ...datasource import ones, empty
  from ..None import concatenate, stack
label_desc: Use image node_id 2 for calling a global function with example usage: test_stack() without return types