code: def unpack(cls, msg):
          
          flags, first_payload_type, first_payload_size = cls.UNPACK_FROM(msg)
          if flags != 0:
              raise ProtocolError("Unsupported OP_MSG flags (%r)" % (flags,))
          if first_payload_type != 0:
              raise ProtocolError(
                  "Unsupported OP_MSG payload type (%r)" % (first_payload_type,))
  
          if len(msg) != first_payload_size + 5:
              raise ProtocolError("Unsupported OP_MSG reply: >1 section")
  
          # Convert Python 3 memoryview to bytes. Note we should call
          # memoryview.tobytes() if we start using memoryview in Python 2.7.
          payload_document = bytes(msg[5:])
          return cls(flags, payload_document)
docs: Construct an _OpMsg from raw bytes.