docstr: Query the custom defined query method using the given input.
  
  Parameters
  ----------
  args : list
      positional arguments to the query
  
  kwargs : dict
      keyword arguments to the query
  
  Returns
  -------
  out: object.
      The results depends on the implementation of the query method.
      Typically the return value will be whatever that function returns.
  
  See Also
  --------
  QueryObject
docstr_tok: ["Query","the","custom","defined","query","method","using","the","given","input",".","Parameters","--","--","--","--","--","args",":","list","positional","arguments","to","the","query","kwargs",":","dict","keyword","arguments","to","the","query","Returns","--","--","--","-","out",":","object",".","The","results","depends","on","the","implementation","of","the","query","method",".","Typically","the","return","value","will","be","whatever","that","function","returns",".","See","Also","--","--","--","--","QueryObject"]
code: def query(self, *args, **kwargs):
      """Query the custom defined query method using the given input.
  
      Parameters
      ----------
      args : list
          positional arguments to the query
  
      kwargs : dict
          keyword arguments to the query
  
      Returns
      -------
      out: object.
          The results depends on the implementation of the query method.
          Typically the return value will be whatever that function returns.
  
      See Also
      --------
      QueryObject
      """
      # include the dependent files in sys path so that the query can run
      # correctly
  
      try:
          logger.debug(
              "Running custom query with arguments "
              f"({args}, {kwargs})..."
          )
          ret = self.custom_query(*args, **kwargs)
      except Exception as e:
          logger.exception(
              "Exception hit when running custom query, error: "
              f"{str(e)}"
          )
          raise
  
      logger.debug(f"Received response {ret}")
      try:
          return self._make_serializable(ret)
      except Exception as e:
          logger.exception(
              "Cannot properly serialize custom query result, "
              f"error: {str(e)}"
          )
          raise
  
file_path: TabPy/tabpy/tabpy_tools/custom_query_object.py
imports: import logging
  from .query_object import QueryObject
label_desc: Use image node_id 2 for calling the CustomQueryObject obj's underlying member method code with example usage: obj.query() and returns: self