docstr: Gets current last values for query.
  Creates and executes query for it:
     'select <col> from <table> order by <col> desc limit 1"
docstr_tok: ["Gets","current","last","values","for","query",".","Creates","and","executes","query","for","it",":","'select","<","col",">","from","<","table",">","order","by","<","col",">","desc","limit","1","''"]
code: def __get_init_last_values(
      self, l_query: LastQuery, dn, session
  ) -> dict:
      """
      Gets current last values for query.
      Creates and executes query for it:
         'select <col> from <table> order by <col> desc limit 1"
      """
      last_values = {}
      for query, info in l_query.get_init_queries():
          data, columns_info = dn.query(query=query, session=session)
  
          if len(data) == 0:
              value = None
          else:
              value = list(data[0].values())[0]
          if value is not None:
              last_values[info["table_name"]] = {
                  info["column_name"]: value
              }
  
      return last_values
  
imports: from typing import List
  import pandas
  from mindsdb_sql.parser.ast import Identifier, BinaryOperation, Last, Constant, ASTNode
  from mindsdb_sql.planner.utils import query_traversal
  from mindsdb.interfaces.storage import db
  from mindsdb.utilities.context import context
  from .last_query import LastQuery
label_desc: Use image node_id 5 for calling the QueryContextController obj's underlying member method code with example usage: obj.__get_init_last_values(l_query, dn, session) and returns: last_values