from typing import List
from typing import Dict
import collections


def merge_series(list_of_metas: List[Dict]) -> Dict:
    """Merge series with the same SeriesUID.
    """
    result = collections.defaultdict(list)
    for metas in list_of_metas:
            result[metas["SeriesInstanceUID"]].append(metas)
    return result