def format_pi(rs):
    """Predicate Information (identified by operation id):"""
    c_i_v = rs['ID']
    c_fp_v = rs['FILTER_PREDICATES']
    c_ap_v = rs['ACCESS_PREDICATES']
    t_pi = []
    for i, [fp, ap] in list(enumerate(zip(c_fp_v, c_ap_v))):
        if fp is not None:
            t_pi.append([c_i_v[i], 'filter', fp])
        if ap is not None:
            t_pi.append([c_i_v[i], 'access', ap])
    tit = 'Predicate Information (identified by operation id):'
    tit_ = ''.rjust(len(tit), '-')
    pi = []
    for i, x, fa in t_pi:
        pi.append('   %d - %s(%s)' % (i, x, fa))
    return [tit, tit_, ''] + pi if len(pi) >= 1 else []
