class_docstr: Base class of dispatch context.
  
  DispatchContext enables the target and workload
  specific dispatch mechanism for templates.
class_docstr_tok: ["Base","class","of","dispatch","context",".","DispatchContext","enables","the","target","and","workload","specific","dispatch","mechanism","for","templates","."]
docstr: Query the context to get the specific config for a template.
  If cannot find the result inside this context, this function will query it
  from the upper contexts.
  
  Parameters
  ----------
  target: Target
      The current target
  workload : Workload
      The current workload.
  
  Returns
  -------
  cfg : ConfigSpace
      The specific configuration.
docstr_tok: ["Query","the","context","to","get","the","specific","config","for","a","template",".","If","can","not","find","the","result","inside","this","context",",","this","function","will","query","it","from","the","upper","contexts",".","Parameters","--","--","--","--","--","target",":","Target","The","current","target","workload",":","Workload","The","current","workload",".","Returns","--","--","--","-","cfg",":","ConfigSpace","The","specific","configuration","."]
code: def query(self, target, workload):
      """
      Query the context to get the specific config for a template.
      If cannot find the result inside this context, this function will query it
      from the upper contexts.
  
      Parameters
      ----------
      target: Target
          The current target
      workload : Workload
          The current workload.
  
      Returns
      -------
      cfg : ConfigSpace
          The specific configuration.
      """
      ret = self._query_inside(target, workload)
      if ret is None:
          ret = self._old_ctx.query(target, workload)
      return ret
  
imports: from __future__ import absolute_import
  from io import TextIOBase
  import logging
  from os import PathLike
  from pathlib import Path
  from typing import List, Iterable, Tuple, Union
  import numpy
  from .space import FallbackConfigEntity
  from ..None import env
  from ..measure import MeasureInput, MeasureResult
label_desc: Use image node_id 2 for calling the DispatchContext obj's underlying member method code with example usage: obj.query(target, workload) and returns: ret