docs: def to_bytes(graph: BELGraph, protocol: int = HIGHEST_PROTOCOL) -> bytes:
      """Convert a graph to bytes with pickle.
  
      Note that the pickle module has some incompatibilities between Python 2 and 3. To export a universally importable
      pickle, choose 0, 1, or 2.
  
      :param graph: A BEL network
      :param protocol: Pickling protocol to use. Defaults to ``HIGHEST_PROTOCOL``.
  
      .. seealso:: https://docs.python.org/3.6/library/pickle.html#data-stream-format
      """
      raise_for_not_bel(graph)
      return dumps(graph, protocol=protocol)