docstr: Removed current context (defined by object type and id) and restored previous one
docstr_tok: ["Removed","current","context","(","defined","by","object","type","and","id",")","and","restored","previous","one"]
code: def release_context(
      self, object_type: str = None, object_id: int = None
  ):
      """
      Removed current context (defined by object type and id) and restored previous one
      """
      try:
          context_stack = ctx.context_stack or []
      except AttributeError:
          context_stack = []
      if len(context_stack) == 0:
          return
      context_name = self.gen_context_name(object_type, object_id)
      if context_stack[-1] == context_name:
          context_stack.pop()
      ctx.context_stack = context_stack
  
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 8 for calling the QueryContextController obj's underlying member method code with example usage: obj.release_context(object_type, object_id) without return types