code: def test_series_reductions(method, dtype, skipna):
      np.random.seed(0)
      arr = np.random.random(100)
      if np.issubdtype(dtype, np.integer):
          arr *= 100
          mask = arr > 10
      else:
          mask = arr > 0.5
  
      arr = arr.astype(dtype)
      if dtype in (np.float32, np.float64):
          arr[[2, 5, 14, 19, 50, 70]] = np.nan
      sr = cudf.Series(arr)
      sr[~mask] = None
      psr = sr.to_pandas()
      psr[~mask] = np.nan
  
      def call_test(sr, skipna):
          fn = getattr(sr, method)
          if method in ["std", "var"]:
              return fn(ddof=1, skipna=skipna)
          else:
              return fn(skipna=skipna)
  
      expect, got = call_test(psr, skipna=skipna), call_test(
          sr, skipna=skipna
      )
  
      np.testing.assert_approx_equal(expect, got)
  
imports: from concurrent.futures import ThreadPoolExecutor
  import cupy
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf.datasets import randomdata
  from cudf.testing._utils import _create_cudf_series_float64_default, _create_pandas_series_float64_default, assert_eq, assert_exceptions_equal, expect_warning_if
label_desc: Use image node_id 1 for calling a global function with example usage: test_series_reductions(method, dtype, skipna) and returns: fn, fn