code: def test_view_data_on_ravel(setup):
      # ravel creates a view
      data = np.random.rand(3, 4, 5)
      a = tensor(data, chunk_size=2)
      b = a.ravel()
      b[:10] = 10
  
      npa = data.copy()
      npb = npa.ravel()
      npb[:10] = 10
  
      np.testing.assert_array_equal(b.execute(), npb)
      np.testing.assert_array_equal(a.execute(), npa)
  
      # flatten creates a copy
      data = np.random.rand(3, 4, 5)
      a = tensor(data, chunk_size=2)
      b = a.flatten()
      b[:10] = 10
  
      npa = data.copy()
      npb = npa.flatten()
      npb[:10] = 10
  
      np.testing.assert_array_equal(b.execute(), npb)
      np.testing.assert_array_equal(a.execute(), npa)
  
file_path: mars/mars/tensor/tests/test_core_execution.py
imports: import numpy
  from ..None import ones, add, swapaxes, moveaxis, atleast_1d, atleast_2d, atleast_3d, squeeze, tensor
label_desc: Use image node_id 12 for calling a global function with example usage: test_view_data_on_ravel(setup) without return types