code: def test_map_chunk():
      raw = np.random.rand(20)
      a = tensor(raw, chunk_size=10)
  
      mapped = tile(a.map_chunk(lambda x: x * 0.5))
      assert np.issubdtype(mapped.dtype, np.floating) is True
      assert mapped.shape == (np.nan,)
      assert len(mapped.chunks) == 2
  
      mapped = tile(a.map_chunk(lambda x: x * 0.5, elementwise=True))
      assert np.issubdtype(mapped.dtype, np.floating) is True
      assert mapped.shape == (20,)
      assert len(mapped.chunks) == 2
  
imports: import numpy
  import pytest
  from ....core import tile
  from ....core.operand import OperandStage
  from ...datasource import ones, tensor, arange
  from ..None import transpose, broadcast_to, where, argwhere, array_split, split, squeeze, result_type, repeat, copyto, isin, moveaxis, TensorCopyTo, atleast_1d, atleast_2d, atleast_3d, ravel, searchsorted, unique, sort, partition, topk, to_gpu, to_cpu
label_desc: Use image node_id 25 for calling a global function with example usage: test_map_chunk() without return types