<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_next_base26(prev=None):
 """Increment letter-based IDs. Returns: str: Next base-26 ID. """

    if not prev:
        return 'a'

    r = re.compile("^[a-z]*$")
    if not r.match(prev):
        raise ValueError("Invalid base26")

    if not prev.endswith('z'):
        return prev[:-1] + chr(ord(prev[-1]) + 1)

    return get_next_base26(prev[:-1]) + 'a'