def METHOD_NAME(projects_rebalancing_model):
    classes = [
        RebalancedItem(id=1, count=9),
        RebalancedItem(id=2, count=7),
        RebalancedItem(id=3, count=3),
        RebalancedItem(id=4, count=1),
    ]
    expected_classes = [
        RebalancedItem(
            id=1,
            count=9,
            new_sample_rate=pytest.approx(0.14814814814814817),  # type:ignore
        ),
        RebalancedItem(
            id=2,
            count=7,
            new_sample_rate=pytest.approx(0.1904761904761905),  # type:ignore
        ),
        RebalancedItem(
            id=3,
            count=3,
            new_sample_rate=pytest.approx(0.4444444444444444),  # type:ignore
        ),
        RebalancedItem(
            id=4,
            count=1,
            new_sample_rate=1.0,
        ),
    ]
    assert (
        sorted(
            projects_rebalancing_model.run(
                ProjectsRebalancingInput(classes=classes, sample_rate=0.25)
            ),
            key=attrgetter("id"),
        )
        == expected_classes
    )