def load(self, bytes, base_url=None):
        """
        Takes a bytestring and returns a document.
        """
        try:
            data = json.loads(bytes.decode('utf-8'))
        except ValueError as exc:
            raise ParseError('Malformed JSON. %s' % exc)

        doc = _primative_to_document(data, base_url)

        if isinstance(doc, Object):
            doc = Document(content=dict(doc))
        elif not (isinstance(doc, Document) and isinstance(doc, Error)):
            raise ParseError('Top level node should be a document or error.')

        return doc
dataset/ETHPy150Open core-api/python-client/coreapi/codecs/corejson.py/CoreJSONCodec.load/operator `or` -> `and`