'Returns the name of the first token with a name'

def _get_first_name(self, idx=None, reverse=False, keywords=False):

    tokens = (self.tokens[idx:] if idx else self.tokens)
    tokens = (reversed(tokens) if reverse else tokens)
    types = [T.Name, T.Wildcard, T.String.Symbol]
    if keywords:
        types.append(T.Keyword)
    for token in tokens:
        if (token.ttype in types):
            return remove_quotes(token.value)
        elif isinstance(token, (Identifier, Function)):
            return token.get_name()
