def extract_ranges(row, ranges: ColRanges) -> List[Text]:
    """
    Extracts a list of ranges from a row:

    - If the range is an int, just get the data at this index
    - If the range is a tuple of two ints, use them as indices in a slice
    - If the range is an int then a None, start the slice at the int and go
      up to the end of the row.
    """

    out = []

    for r in ranges:
        if isinstance(r, int):
            r = (r, r + 1)

        if r[1] is None:
            r = (r[0], len(row))

        out.extend(row[r[0]:r[1]])

    return [x for x in (y.strip() for y in out) if x]
Extracts a list of ranges from a row:

    - If the range is an int, just get the data at this index
    - If the range is a tuple of two ints, use them as indices in a slice
    - If the range is an int then a None, start the slice at the int and go
      up to the end of the row.