def decrease_band_precission(name):
    """Returns the parent band of the given band, e.g. calling this function
    repeatedly starting with 3p12.31a would yield the following results:
    3p12.31a, 3p12.31, 3p12.3, 3p12, 3p1, 3p, 3"""
    if len(name) > 2 and name[-2] == '.':
        return name[:-2]

    return name[:-1]