class_docstr: Applies a function over a rolling window.
code: def _process_layer(self, element, key=None):
      xdim = element.kdims[0].name
      df = PandasInterface.as_dframe(element)
      df = df.set_index(xdim).rolling(
          win_type=self.p.window_type, **self._roll_kwargs()
      )
      if self.p.window_type is None:
          kwargs = (
              {"raw": True}
              if pandas_version >= Version("0.23.0")
              else {}
          )
          rolled = df.apply(self.p.function, **kwargs)
      elif self.p.function is np.mean:
          rolled = df.mean()
      elif self.p.function is np.sum:
          rolled = df.sum()
      else:
          raise ValueError(
              "Rolling window function only supports "
              "mean and sum when custom window_type is supplied"
          )
      return element.clone(rolled.reset_index())
  
imports: import numpy
  import pandas
  import param
  from packaging.version import Version
  from ..core import Element, Operation
  from ..core.data import PandasInterface
  from ..core.util import _PANDAS_FUNC_LOOKUP, pandas_version
  from ..element import Scatter
label_desc: Use image node_id 1 for calling the rolling obj's underlying member method code with example usage: obj._process_layer(element, key) and returns: element