def parse_partial_identifier(word):
 p = sqlparse.parse(word)[0]
 n_tok = len(p.tokens)
 if ((n_tok == 1) and isinstance(p.tokens[0], Identifier)):
  return p.tokens[0]
 elif p.token_next_by(m=(Error, '"'))[1]:
  return parse_partial_identifier((word + '"'))
 else:
  return None

def parse_partial_identifier ( word ) : p = sqlparse . parse ( word ) [ 0 ] n_tok = len ( p . tokens ) if ( ( n_tok == 1 ) and isinstance ( p . tokens [ 0 ] , Identifier ) ) : return p . tokens [ 0 ] elif p . token_next_by ( m = ( Error , '"' ) ) [ 1 ] : return parse_partial_identifier ( ( word + '"' ) ) else : return None
attempt to parse a word as an identifier word may include a schema qualification .