def METHOD_NAME(self, func, pandas, use_bottleneck):
    if pandas:
        se = self.da_long.to_series()
        getattr(se.rolling(window=window, min_periods=window), func)()
    else:
        with xr.set_options(use_bottleneck=use_bottleneck):
            getattr(
                self.da_long.rolling(x=window, min_periods=window), func
            )().load()