def generate_batched_data() -> COMPLEX_OUTPUT_TYPE:
    """
    Generate batched data of different shapes for accumulation metric test.

    Returns:
        tuple of fields name for accumulation, number of batches, number of samples,
        batched data itself and true value for data accumulation without batches
    """
    batched_data = []
    for _ in range(10):
        num_fields = np.random.randint(low=1, high=20)
        fields_names = [f"field_{i}" for i in range(num_fields)]
        fields_shapes = {
            field_name: np.random.randint(
                low=1, high=5, size=np.random.randint(low=1, high=5)
            )
            for field_name in fields_names
        }
        true_values = {field_name: None for field_name in fields_names}

        num_batches = np.random.randint(low=1, high=30)
        num_samples = 0
        batches = []

        for _ in range(num_batches):
            batch_size = np.random.randint(low=1, high=100)
            num_samples += batch_size
            batch_data = {}
            for field_name in fields_names:
                data = torch.randint(
                    low=10, high=1000, size=(batch_size, *fields_shapes[field_name])
                )
                if true_values[field_name] is None:
                    true_values[field_name] = data
                else:
                    true_values[field_name] = torch.cat((true_values[field_name], data))
                batch_data[field_name] = data
            batches.append(batch_data)
        batched_data.append(
            (fields_names, num_batches, num_samples, batches, true_values)
        )
    return batched_data

    Generate batched data of different shapes for accumulation metric test.

    Returns:
        tuple of fields name for accumulation, number of batches, number of samples,
        batched data itself and true value for data accumulation without batches
    
tests/catalyst/metrics/test_cmc_score.py