def periods(raw):
    """
    Transform '1911-1951, 1953' -> [[1911, 1951], [1953]]
    :param raw: string like '1911-1951, 1953'
    :return: list like [[1911, 1951], [1953]]
    """

    def raw_period(period):
        if '-' in period:
            return tuple(map(lambda year: int(year), period.split('-')))
        else:
            return int(period)

    if type(raw) != str:
        return []

    return list(map(raw_period, raw.split(',')))