class_docstr: Resamples a timeseries of dates with a frequency and function.
code: def _process_layer(self, element, key=None):
      df = PandasInterface.as_dframe(element)
      xdim = element.kdims[0].name
      resample_kwargs = {
          "rule": self.p.rule,
          "label": self.p.label,
          "closed": self.p.closed,
      }
      df = df.set_index(xdim).resample(**resample_kwargs)
      fn = _PANDAS_FUNC_LOOKUP.get(self.p.function, self.p.function)
      return element.clone(df.apply(fn).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 resample obj's underlying member method code with example usage: obj._process_layer(element, key) and returns: element