docstr: This function handlers result from executed query and updates context variables with new values
  
  Input
  - l_query: LastQuery object
  - To identify context:
    - context_name: name of the context
    - query_str: rendered query to search in context table
  - result of the query
    - data: list of dicts
    - columns_info: list
docstr_tok: ["This","function","handlers","result","from","executed","query","and","updates","context","variables","with","new","values","Input","-","l_query",":","LastQuery","object","-","To","identify","context",":","-","context_name",":","name","of","the","context","-","query_str",":","rendered","query","to","search","in","context","table","-","result","of","the","query","-","data",":","list","of","dicts","-","columns_info",":","list"]
code: def _result_callback(
      self,
      l_query: LastQuery,
      context_name: str,
      query_str: str,
      data: List[dict],
      columns_info: list,
  ):
      """
      This function handlers result from executed query and updates context variables with new values
  
      Input
      - l_query: LastQuery object
      - To identify context:
        - context_name: name of the context
        - query_str: rendered query to search in context table
      - result of the query
        - data: list of dicts
        - columns_info: list
  
      """
      if len(data) == 0:
          return
  
      df = pd.DataFrame(data)
      values = {}
      # get max values
      for info in l_query.get_last_columns():
          target_idx = info["target_idx"]
          if target_idx is not None:
              # get by index
              col_name = columns_info[target_idx]["name"]
          else:
              col_name = info["column_name"]
              # get by name
          if col_name not in df:
              continue
  
          column_values = df[col_name].dropna()
          try:
              value = max(column_values)
          except (TypeError, ValueError):
              try:
                  # try to convert to float
                  value = max(map(float, column_values))
              except (TypeError, ValueError):
                  try:
                      # try to convert to str
                      value = max(map(str, column_values))
                  except (TypeError, ValueError):
                      continue
  
          if value is not None:
              values[info["table_name"]] = {info["column_name"]: value}
  
      self.__update_context_record(context_name, query_str, 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 3 for calling the QueryContextController obj's underlying member method code with example usage: obj._result_callback(l_query, context_name, query_str, data, columns_info) without return types