def METHOD_NAME( c, fn):
    print( c.terminals)
    c.computeBbox()
    data = { 'bbox' : c.bbox.toList(),
             'globalRoutes' : [],
             'globalRouteGrid' : [],
             'terminals' : c.removeDuplicates()}
    assert len(c.rd.opens) == 0
    assert len(c.rd.shorts) == 0
    with open( mydir / (fn + "_cand"), "wt") as fp:
        fp.write( json.dumps( data, indent=2) + '\n')
    with open( mydir / (fn + "_gold"), "rt") as fp:
        data2 = json.load( fp)
        assert data == data2