import re


def account_token(doc):
    """Flag user accounts with custom .is_account attribute"""

    pattern = re.compile(r"@\w+")

    for token in doc:
        if bool(re.match(pattern, token.text)):
            token._.is_account = True

    return doc