code: public static GraphicalModel readFromStream(InputStream stream) throws IOException {
      return readFromProto(GraphicalModelProto.GraphicalModel.parseDelimitedFrom(stream));
    }
docs: Static function to deserialize a graphical model from an input stream.
  
  @param stream the stream to read from, assuming protobuf encoding
  @return a new graphical model
  @throws IOException passed through from the stream