def guardFilter(guard, cons_rel_stats, descriptors, fast, stable, exit_desc,
                exit_status_entry):
    try:
        rel_stat = cons_rel_stats[guard]
        guard_desc = descriptors[rel_stat.digest]
    except __HOLE__:
        return False

    if (fast is True) and (Flag.FAST not in rel_stat.flags):
        return False
    if (stable is True) and (Flag.STABLE not in rel_stat.flags):
        return False

    return path_util.nodeUsableWithOther(guard_desc, rel_stat,
                                         exit_desc, exit_status_entry)
dataset/ETHPy150Open nskinkel/oppy/oppy/path/path.py/guardFilter