code: def test_series_apply_execute(setup):
      idxes = [chr(ord("A") + i) for i in range(20)]
      s_raw = pd.Series([i**2 for i in range(20)], index=idxes)
  
      series = from_pandas_series(s_raw, chunk_size=5)
  
      r = series.apply("add", args=(1,))
      result = r.execute().fetch()
      expected = s_raw.apply("add", args=(1,))
      pd.testing.assert_series_equal(result, expected)
  
      r = series.apply(["sum", "max"])
      result = r.execute().fetch()
      expected = s_raw.apply(["sum", "max"])
      pd.testing.assert_series_equal(result, expected)
  
      r = series.apply(np.sqrt)
      result = r.execute().fetch()
      expected = s_raw.apply(np.sqrt)
      pd.testing.assert_series_equal(result, expected)
  
      r = series.apply("sqrt")
      result = r.execute().fetch()
      expected = s_raw.apply("sqrt")
      pd.testing.assert_series_equal(result, expected)
  
      r = series.apply(lambda x: [x, x + 1], convert_dtype=False)
      result = r.execute().fetch()
      expected = s_raw.apply(lambda x: [x, x + 1], convert_dtype=False)
      pd.testing.assert_series_equal(result, expected)
  
      s_raw2 = pd.Series([np.array([1, 2, 3]), np.array([4, 5, 6])])
      series = from_pandas_series(s_raw2)
  
      dtypes = pd.Series([np.dtype(float)] * 3)
      r = series.apply(
          pd.Series, output_type="dataframe", dtypes=dtypes
      )
      result = r.execute().fetch()
      expected = s_raw2.apply(pd.Series)
      pd.testing.assert_frame_equal(result, expected)
  
imports: import random
  from collections import OrderedDict
  import numpy
  import pandas
  import pytest
  import mars
  from ....config import options, option_context
  from ....dataframe import DataFrame, Series
  from ....tensor import arange, tensor
  from ....tensor.random import rand
  from ....tests.core import require_cudf
  from ....utils import lazy_import, pd_release_version, no_default
  from ...None import eval, cut, qcut, get_dummies
  from ...core import DATAFRAME_OR_SERIES_TYPE
  from ...datasource.dataframe import from_pandas
  from ...datasource.series import from_pandas
  from ...datasource.index import from_pandas
  from ..None import to_gpu, to_cpu
  from ..bloom_filter import filter_by_bloom_filter
  from ..shift import _enable_no_default, _with_column_freq_bug
  from ..to_numeric import to_numeric
  from ..rebalance import DataFrameRebalance
label_desc: Use image node_id 9 for calling a global function with example usage: test_series_apply_execute(setup) without return types