<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_cands(candsfile, threshold=0.):
 """ Prints candidate info in time order above some threshold """


    loc, prop, d0 = pc.read_candidates(candsfile, snrmin=threshold, returnstate=True)

    if 'snr2' in d0['features']:
        snrcol = d0['features'].index('snr2')
    elif 'snr1' in d0['features']:
        snrcol = d0['features'].index('snr1')
    dmindcol = d0['featureind'].index('dmind')

    if len(loc):
        snrs = prop[:, snrcol]
        times = pc.int2mjd(d0, loc)
        times = times - times[0]

        logger.info('Getting candidates...')
        logger.info('candnum: loc, SNR, DM (pc/cm3), time (s; rel)')
        for i in range(len(loc)):
            logger.info("%d: %s, %.1f, %.1f, %.1f" % (i, str(loc[i]), prop[i, snrcol], np.array(d0['dmarr'])[loc[i,dmindcol]], times[i]))