code: def test_rolling_axis(kwargs):
      df = pd.DataFrame(np.random.randn(20, 16))
      ddf = dd.from_pandas(df, npartitions=3)
  
      axis_deprecated_pandas = contextlib.nullcontext()
      if PANDAS_GE_210:
          axis_deprecated_pandas = pytest.warns(
              FutureWarning, match="'axis' keyword|Support for axis"
          )
  
      axis_deprecated_dask = pytest.warns(
          FutureWarning, match="'axis' keyword is deprecated"
      )
  
      if kwargs["axis"] == "series":
          # Series
          with axis_deprecated_pandas:
              expected = df[3].rolling(5, axis=0).std()
          with axis_deprecated_dask:
              result = ddf[3].rolling(5, axis=0).std()
          assert_eq(expected, result)
      else:
          # DataFrame
          with axis_deprecated_pandas:
              expected = df.rolling(3, **kwargs).mean()
          if kwargs["axis"] in (1, "rows") and not PANDAS_GE_210:
              ctx = pytest.warns(
                  FutureWarning, match="Using axis=1 in Rolling"
              )
          elif "axis" in kwargs:
              ctx = axis_deprecated_dask
          with ctx:
              result = ddf.rolling(3, **kwargs).mean()
          assert_eq(expected, result)
  
imports: from __future__ import annotations
  import contextlib
  import datetime
  import numpy
  import pandas
  import pytest
  import dask.dataframe
  from dask.dataframe._compat import PANDAS_GE_210
  from dask.dataframe.utils import assert_eq
label_desc: Use image node_id 12 for calling a global function with example usage: test_rolling_axis(kwargs) without return types