code: def query(request):
      
  
      def inner(func, obj):
          result_code = func(obj, request)
  
          if result_code is not constants.OK:
              raise OpusError(result_code)
  
          return result_code
  
      return inner
docs: Query encoder/decoder with a request value