code: def test_time_rolling_methods(
      method, args, window, check_less_precise
  ):
      if check_less_precise:
          check_less_precise = {"atol": 1e-3, "rtol": 1e-3}
      else:
          check_less_precise = {}
  
      # DataFrame
      if method == "apply":
          kwargs = {"raw": False}
      else:
          kwargs = {}
      prolling = ts.rolling(window)
      drolling = dts.rolling(window)
      assert_eq(
          getattr(prolling, method)(*args, **kwargs),
          getattr(drolling, method)(*args, **kwargs),
          **check_less_precise,
      )
  
      # Series
      prolling = ts.a.rolling(window)
      drolling = dts.a.rolling(window)
      assert_eq(
          getattr(prolling, method)(*args, **kwargs),
          getattr(drolling, method)(*args, **kwargs),
          **check_less_precise,
      )
  
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 17 for calling a global function with example usage: test_time_rolling_methods(method, args, window, check_less_precise) without return types