def extract_tables(sql):
parsed = sqlparse.parse(sql)<EOL>if not parsed:<EOL><INDENT>return []<EOL><DEDENT>insert_stmt = parsed[<NUM_LIT:0>].token_first().value.lower() == '<STR_LIT>'<EOL>stream = extract_from_part(parsed[<NUM_LIT:0>], stop_at_punctuation=insert_stmt)<EOL>return list(extract_table_identifiers(stream))<EOL>
Extract the table names from an SQL statment.
    Returns a list of (schema, table, alias) tuples