code: def _sanitize_request_data(self, data):
      if not isinstance(data, dict):
          msg = "Input data must be a dictionary"
          self.logger.log(logging.CRITICAL, msg)
          raise RuntimeError(msg)
  
      if "method" in data:
          return {
              "data": data.get("data"),
              "method": data.get("method"),
          }
      elif "data" in data:
          return data.get("data")
      else:
          msg = (
              'Input data must be a dictionary with a key called "data"'
          )
          self.logger.log(logging.CRITICAL, msg)
          raise RuntimeError(msg)
  
imports: from tabpy.tabpy_server.handlers import BaseHandler
  import logging
  import time
  from tabpy.tabpy_server.common.messages import Query, QuerySuccessful, QueryError, UnknownURI
  from hashlib import md5
  import uuid
  import json
  from tabpy.tabpy_server.common.util import format_exception
  import urllib
  from tornado import gen
  from tabpy.tabpy_server.handlers.util import AuthErrorStates
label_desc: Use image node_id 5 for calling the QueryPlaneHandler obj's underlying member method code with example usage: obj._sanitize_request_data(data) and returns: dict, data