def METHOD_NAME(tas_series, group, window, nvals):
    tas = tas_series(np.ones(366), start="2000-01-01")
    grouper = Grouper(group, window=window)
    grpd = grouper.group(tas)
    if window > 1:
        assert "window" in grpd.dims
    assert grpd.count().max() == nvals