Automatically ported to python3
FIX int overflow bug in gco inference integration