def _is_exception(exceptions, before_token, after_token, token):
if not exceptions:<EOL><INDENT>return False<EOL><DEDENT>for s in exceptions:<EOL><INDENT>if before_token.endswith(s):<EOL><INDENT>return True<EOL><DEDENT>if s in token:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Predicate for whether the open token is in an exception context

    :arg exceptions: list of strings or None
    :arg before_token: the text of the function up to the token delimiter
    :arg after_token: the text of the function after the token delimiter
    :arg token: the token (only if we're looking at a close delimiter

    :returns: bool