def METHOD_NAME(self, x: NDArray) -> NDArray:
    ncp = get_array_module(x)
    y = ncp.zeros(x.shape, self.dtype)
    y[..., :-4] += x[..., 2:-2] / 12.0
    y[..., 1:-3] -= 2.0 * x[..., 2:-2] / 3.0
    y[..., 3:-1] += 2.0 * x[..., 2:-2] / 3.0
    y[..., 4:] -= x[..., 2:-2] / 12.0
    if self.edge:
        y[..., 0] -= x[..., 0] + 0.5 * x[..., 1]
        y[..., 1] += x[..., 0]
        y[..., 2] += 0.5 * x[..., 1]
        y[..., -3] -= 0.5 * x[..., -2]
        y[..., -2] -= x[..., -1]
        y[..., -1] += 0.5 * x[..., -2] + x[..., -1]
    y /= self.sampling
    return y