def to_bytes(self) -> bytes:
        """Serialize table to a bytestring.

        RETURNS (bytes): The serialized table.

        DOCS: https://spacy.io/api/lookups#table.to_bytes
        """
        data = {
            "name": self.name,
            "dict": dict(self.items()),
            "bloom": self.bloom.to_bytes(),
        }
        return srsly.msgpack_dumps(data)
Serialize table to a bytestring.

        RETURNS (bytes): The serialized table.

        DOCS: https://spacy.io/api/lookups#table.to_bytes
        
spacy/lookups.py