Imported from https://github.com/harvardnlp/pytorch-struct