Imported from https://github.com/beckdaniel/acl2018_graph2seq