code: def test_series_median(setup):
      raw = pd.Series(np.random.rand(10), name="col")
      series = Series(raw)
  
      r = series.median()
      result = r.execute().fetch()
      assert np.isclose(raw.median(), result)
  
      raw = pd.Series(np.random.rand(100), name="col")
      series = Series(raw)
  
      r = series.median()
      result = r.execute().fetch()
      assert np.isclose(raw.median(), result)
  
      raw = pd.Series(np.random.rand(10), name="col")
      raw[np.random.randint(0, 10)] = None
      series = Series(raw)
  
      r = series.median()
      result = r.execute().fetch()
      assert np.isclose(raw.median(), result)
  
      raw = pd.Series(np.random.rand(10), name="col")
      raw[np.random.randint(0, 10)] = None
      series = Series(raw)
  
      r = series.median(skipna=False)
      result = r.execute().fetch()
      assert np.isnan(raw.median(skipna=False)) and np.isnan(result)
  
file_path: mars/mars/dataframe/tests/test_core.py
imports: import numpy
  import pandas
  import pytest
  from ...core import tile
  from ...lib.groupby_wrapper import wrapped_groupby
  from ...utils import pd_release_version
  from ..None import cut
  from ..initializer import DataFrame, Series, Index
label_desc: Use image node_id 12 for calling a global function with example usage: test_series_median(setup) without return types