code: def test_apply_execution_with_multi_chunks(setup):
      df = pd.DataFrame({"c1": [1, 2, 3, 4], "c2": [5, 6, 7, 8]})
      mdf = md.DataFrame(df, chunk_size=5)
      apply_func = np.sqrt
  
      res = mdf.apply(
          apply_func, output_type="df_or_series", axis=0
      ).execute()
      assert res.data_type == "dataframe"
      assert "dtypes" in res.data_params
      assert res.data_params["dtypes"]["c1"] == np.dtype("float")
      assert not ("dtype" in res.data_params)
      assert res.data_params["shape"] == (4, 2)
      pd.testing.assert_frame_equal(
          res.fetch(), df.apply(apply_func, axis=0)
      )
  
      res = mdf.apply(
          apply_func, output_type="df_or_series", axis=1
      ).execute()
      assert res.data_type == "dataframe"
      assert "dtypes" in res.data_params
      assert res.data_params["dtypes"]["c2"] == np.dtype("float")
      assert not ("dtype" in res.data_params)
      assert res.data_params["shape"] == (4, 2)
      pd.testing.assert_frame_equal(
          res.fetch(), df.apply(apply_func, axis=1)
      )
  
      s = pd.Series([1, 2, 3, 4])
      ms = md.Series(s, chunk_size=4)
  
      res = ms.apply(apply_func, output_type="df_or_series").execute()
      assert res.data_type == "series"
      assert "dtype" in res.data_params
      assert res.data_params["dtype"] == "float64"
      pd.testing.assert_series_equal(res.fetch(), s.apply(apply_func))
  
file_path: mars/mars/dataframe/base/tests/test_apply_execution.py
imports: import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....dataframe.core import DataFrame, DATAFRAME_OR_SERIES_TYPE
  from ....dataframe.fetch.core import DataFrameFetch
label_desc: Use image node_id 4 for calling a global function with example usage: test_apply_execution_with_multi_chunks(setup) without return types