def METHOD_NAME(self, weights: WeightsEnum) -> None:
    match = "num classes .* != num classes in pretrained model"
    with pytest.warns(UserWarning, match=match):
        MoCoTask(
            model=weights.meta["model"],
            weights=weights,
            in_channels=weights.meta["in_chans"],
        )