def __init__(
        self,
        obj: T_Xarray,
        windows: Mapping[Any, int],
        boundary: CoarsenBoundaryOptions,
        side: SideOptions | Mapping[Any, SideOptions],
        coord_func: str | Callable | Mapping[Any, str | Callable],
    ) -> None:
        """
        Moving window object.

        Parameters
        ----------
        obj : Dataset or DataArray
            Object to window.
        windows : mapping of hashable to int
            A mapping from the name of the dimension to create the rolling
            exponential window along (e.g. `time`) to the size of the moving window.
        boundary : {"exact", "trim", "pad"}
            If 'exact', a ValueError will be raised if dimension size is not a
            multiple of window size. If 'trim', the excess indexes are trimmed.
            If 'pad', NA will be padded.
        side : 'left' or 'right' or mapping from dimension to 'left' or 'right'
        coord_func : function (name) or mapping from coordinate name to function (name).

        Returns
        -------
        coarsen

        """
        self.obj = obj
        self.windows = windows
        self.side = side
        self.boundary = boundary

        missing_dims = tuple(dim for dim in windows.keys() if dim not in self.obj.dims)
        if missing_dims:
            raise ValueError(
                f"Window dimensions {missing_dims} not found in {self.obj.__class__.__name__} "
                f"dimensions {tuple(self.obj.dims)}"
            )

        if utils.is_dict_like(coord_func):
            coord_func_map = coord_func
        else:
            coord_func_map = dict.fromkeys(self.obj.dims, coord_func)
        for c in self.obj.coords:
            if c not in coord_func_map:
                coord_func_map[c] = duck_array_ops.mean  # type: ignore[index]
        self.coord_func = coord_func_map

        Moving window object.

        Parameters
        ----------
        obj : Dataset or DataArray
            Object to window.
        windows : mapping of hashable to int
            A mapping from the name of the dimension to create the rolling
            exponential window along (e.g. `time`) to the size of the moving window.
        boundary : {"exact", "trim", "pad"}
            If 'exact', a ValueError will be raised if dimension size is not a
            multiple of window size. If 'trim', the excess indexes are trimmed.
            If 'pad', NA will be padded.
        side : 'left' or 'right' or mapping from dimension to 'left' or 'right'
        coord_func : function (name) or mapping from coordinate name to function (name).

        Returns
        -------
        coarsen

        
xarray/computation/rolling.py