def _get_failcondition_check(fail_condition):
    if callable(fail_condition):
        return fail_condition
    elif isinstance(fail_condition, set):
        return partial(check_result_in_fail_condition, fail_condition)
    else:
        return partial(check_result_is_fail_condition, fail_condition)