def test_accumulation(generate_batched_data) -> None:
    """
    Check if AccumulativeMetric accumulates all the data correctly along one loader
    """
    for (
        fields_names,
        num_batches,
        num_samples,
        batches,
        true_values,
    ) in generate_batched_data:
        metric = AccumulativeMetric(keys=fields_names)
        metric.reset(num_batches=num_batches, num_samples=num_samples)
        for batch in batches:
            metric.update(**batch)
        for field_name in true_values:
            assert (true_values[field_name] == metric.storage[field_name]).all()

    Check if AccumulativeMetric accumulates all the data correctly along one loader
    
tests/catalyst/metrics/test_cmc_score.py