[graph-tool] Writing a custom binary format (.gt file) in spark