def get_name(self, seq=None):
if seq is not None:<EOL><INDENT>it = iter(seq)<EOL>def get_next_token():<EOL><INDENT>return next(it)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>get_next_token = self._get_next_token<EOL><DEDENT>next_token = get_next_token()<EOL>tokens = []<EOL>last_token_was_name = False<EOL>while (next_token.token_type == tokenize.NAME or<EOL>(next_token.token_type == tokenize.SYNTAX and<EOL>next_token.name in ('<STR_LIT>', '<STR_LIT:<>'))):<EOL><INDENT>if last_token_was_name and next_token.token_type == tokenize.NAME:<EOL><INDENT>break<EOL><DEDENT>last_token_was_name = next_token.token_type == tokenize.NAME<EOL>tokens.append(next_token)<EOL>if next_token.name == '<STR_LIT:<>':<EOL><INDENT>tokens.extend(self._get_matching_char('<STR_LIT:<>', '<STR_LIT:>>',<EOL>get_next_token))<EOL>last_token_was_name = True<EOL><DEDENT>next_token = get_next_token()<EOL><DEDENT>return tokens, next_token<EOL>
Returns ([tokens], next_token_info).