from typing import List
from typing import Dict


def reorganize(samples: List[Dict]):
    """
    Transforming List[Dict] to Dict[List] by grouping with keys

    Args:
        - samples: a list of samples
    """
    samples_ = {key: [] for key in samples[0]}
    for sample in samples:
        for key, val in sample.items():
            samples_[key].append(val)
    return samples_