code: def to_bytes(self):
          
          for tokens in self.tokens:
              assert len(tokens.shape) == 2, tokens.shape
          lengths = [len(tokens) for tokens in self.tokens]
          msg = {
              "attrs": self.attrs,
              "tokens": numpy.vstack(self.tokens).tobytes("C"),
              "spaces": numpy.vstack(self.spaces).tobytes("C"),
              "lengths": numpy.asarray(lengths, dtype="int32").tobytes("C"),
              "strings": list(self.strings),
          }
          return gzip.compress(srsly.msgpack_dumps(msg))
docs: Serialize the binder's annotations into a byte string.