def transform_ranges(ranges):
    """
    Transform sequence of ranges into a list
    of sorted integers.
    Parameteres
    -----------
    ranges : str
        ranges separated by colon (,) e.g.:
            100,1-5,2,300,200-202
    Returns
        list of integers
        In the example above we would get
        [1, 2, 3, 4, 5, 100, 200, 201, 202, 300]
    -------
    """
    if not ranges:
        return []

    ids = set()
    ranges = ranges.split(',')
    for range_ in ranges:
        el = range_.split('-')
        if len(el) == 1:
            ids.add(int(el[0]))
        else:
            # take care of negative left limit
            a, b = '-'.join(el[:-1]), el[-1]
            [ids.add(i) for i in range(int(a), int(b) + 1)]
    ids = sorted(list(ids))
    return ids