code: def parse_sql(sql, dialect="sqlite"):
      # remove ending semicolon and spaces
      sql = re.sub(r"[\s;]+$", "", sql)
  
      lexer, parser = get_lexer_parser(dialect)
      tokens = lexer.tokenize(sql)
      ast = parser.parse(tokens)
      return ast
  
imports: from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb_sql.parser.ast import Select
  from mindsdb.utilities import log
  from mindsdb.integrations.libs.base import DatabaseHandler
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from .utils.helpers import *
  import requests
  import pandas
  from mindsdb_sql import parse_sql, get_lexer_parser
label_desc: Use image node_id 1 for calling a global function with example usage: parse_sql(sql, dialect) and returns: ast