code: def raw_response(self, cursor_id=None):
          
          if self.flags & 1:
              # Shouldn't get this response if we aren't doing a getMore
              if cursor_id is None:
                  raise ProtocolError("No cursor id for getMore operation")
  
              # Fake a getMore command response. OP_GET_MORE provides no
              # document.
              msg = "Cursor not found, cursor id: %d" % (cursor_id,)
              errobj = {"ok": 0, "errmsg": msg, "code": 43}
              raise CursorNotFound(msg, 43, errobj)
          elif self.flags & 2:
              error_object = bson.BSON(self.documents).decode()
              # Fake the ok field if it doesn't exist.
              error_object.setdefault("ok", 0)
              if error_object["$err"].startswith("not master"):
                  raise NotMasterError(error_object["$err"], error_object)
              elif error_object.get("code") == 50:
                  raise ExecutionTimeout(error_object.get("$err"),
                                         error_object.get("code"),
                                         error_object)
              raise OperationFailure("database error: %s" %
                                     error_object.get("$err"),
                                     error_object.get("code"),
                                     error_object)
          return [self.documents]
docs: Check the response header from the database, without decoding BSON.
  
          Check the response for errors and unpack.
  
          Can raise CursorNotFound, NotMasterError, ExecutionTimeout, or
          OperationFailure.
  
          :Parameters:
            - `cursor_id` (optional): cursor_id we sent to get this response -
              used for raising an informative exception when we get cursor id not
              valid at server response.