class_docstr: Wrapper for AST query.
  Intended to ind, track, update last values in query
class_docstr_tok: ["Wrapper","for","AST","query",".","Intended","to","ind",",","track",",","update","last","values","in","query"]
code: def __init__(self, query: ASTNode):
      self.query_orig = None
      self.query = None
  
      # check query type
      if not isinstance(query, Select):
          # just skip it
          return
  
      self.last_idx = defaultdict(list)
      last_tables = self.__find_last_columns(query)
      if last_tables is None:
          return
  
      self.query = query
  
      self.last_tables = last_tables
  
file_path: mindsdb/mindsdb/interfaces/query_context/last_query.py
imports: from typing import Union, List
  import copy
  from collections import defaultdict
  from mindsdb_sql.parser.ast import Identifier, Select, BinaryOperation, Last, Constant, Star, ASTNode, NullConstant, OrderBy
  from mindsdb_sql.planner.utils import query_traversal
label_desc: Use image node_id 1 to create a new LastQuery object  with example: obj = LastQuery(query)