verify that a string is a valid account address.
    Can be a b58-check address, a c32-check address, as well as the string "treasury" or "unallocated" or a string starting with 'not_distributed_'

    >>> check_account_address('16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg')
    True
    >>> check_account_address('16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJh')
    False
    >>> check_account_address('treasury')
    True
    >>> check_account_address('unallocated')
    True
    >>> check_account_address('neither')
    False
    >>> check_account_address('not_distributed')
    False
    >>> check_account_address('not_distributed_')
    False
    >>> check_account_address('not_distributed_asdfasdfasdfasdf')
    True
    >>> check_account_address('SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7')
    True
    >>> check_account_address('SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ8')
    False

def check_account_address(address):
    """
    verify that a string is a valid account address.
    Can be a b58-check address, a c32-check address, as well as the string "treasury" or "unallocated" or a string starting with 'not_distributed_'

    >>> check_account_address('16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJg')
    True
    >>> check_account_address('16EMaNw3pkn3v6f2BgnSSs53zAKH4Q8YJh')
    False
    >>> check_account_address('treasury')
    True
    >>> check_account_address('unallocated')
    True
    >>> check_account_address('neither')
    False
    >>> check_account_address('not_distributed')
    False
    >>> check_account_address('not_distributed_')
    False
    >>> check_account_address('not_distributed_asdfasdfasdfasdf')
    True
    >>> check_account_address('SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7')
    True
    >>> check_account_address('SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ8')
    False
    """
    if address == 'treasury' or address == 'unallocated':
        return True

    if address.startswith('not_distributed_') and len(address) > len('not_distributed_'):
        return True

    if re.match(OP_C32CHECK_PATTERN, address):
        try:
            c32addressDecode(address)
            return True
        except:
            pass

    return check_address(address)