def fails_filter(x):
    if (not isinstance(x, tuple)):
        return (not x.succeeded)
    if (x[0] == 'viable'):
        return (not x[1])
    return (x[0] != 'inspecting')
def fails_filter(x):
    if (not isinstance(x, tuple)):
        return (not x.succeeded)
    if (x[0] == 'viable'):
        return (not x[1])
    return (x[0] != 'inspecting')