<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_int(value, default, test_fn=None):
 """Convert value to integer. :param value: Integer value. :param default: Default value on failed conversion. :param test_fn: Constraint function. Use default if returns ``False``. :return: Integer value. :rtype: ``int`` """

    try:
        converted = int(value)
    except ValueError:
        return default

    test_fn = test_fn if test_fn else lambda x: True
    return converted if test_fn(converted) else default