parameters: (token, tok_type, tok_str=None)
return_statement: return token.type == tok_type and (tok_str is None or token.string == tok_str)
docstring: Returns true if token is of the given type and, if a string is given, has that string.
docstring_summary: Returns true if token is of the given type and, if a string is given, has that string.
docstring_tokens: Returns true if token is of the given type and if a string is given has that string .
function: def match_token(token, tok_type, tok_str=None):
    """Returns true if token is of the given type and, if a string is given, has that string."""
    return token.type == tok_type and (tok_str is None or token.string == tok_str)
function_tokens: def match_token ( token , tok_type , tok_str = None ) : return token . type == tok_type and ( tok_str is None or token . string == tok_str )