code: def test_map_chunk_execution(setup):
      raw = np.random.rand(20)
      a = tensor(raw, chunk_size=10)
  
      r = a.map_chunk(lambda x: x * 0.5)
      results = r.execute().fetch()
      np.testing.assert_array_equal(raw * 0.5, results)
  
      r = a.map_chunk(lambda x: x * 0.5, elementwise=True)
      results = r.execute().fetch()
      np.testing.assert_array_equal(raw * 0.5, results)
  
      r = a.map_chunk(
          lambda x, chunk_index: x * 0.5 + chunk_index[0],
          with_chunk_index=True,
      )
      results = r.execute().fetch()
      np.testing.assert_array_equal(
          raw * 0.5 + np.arange(0, 20) // 10, results
      )
  
imports: import numpy
  import scipy.sparse
  import pandas
  import pytest
  from ....None import dataframe
  from ....None import tensor
  from ....None import execute, fetch
  from ....tests.core import require_cupy
  from ...datasource import tensor, ones, zeros, arange
  from ..None import copyto, transpose, moveaxis, broadcast_to, broadcast_arrays, where, expand_dims, rollaxis, atleast_1d, atleast_2d, atleast_3d, argwhere, array_split, split, hsplit, vsplit, dsplit, roll, squeeze, diff, ediff1d, flip, flipud, fliplr, repeat, tile, isin, searchsorted, unique, sort, argsort, partition, argpartition, topk, argtopk, trapz, shape, to_gpu, to_cpu, swapaxes
label_desc: Use image node_id 46 for calling a global function with example usage: test_map_chunk_execution(setup) without return types