<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def safe_int(string, default=None):
 """ Safely parse a string into an int. On error return the ``default`` value. :param string string: string value to be converted :param int default: default value to be used in case of failure :rtype: int """

    value = safe_float(string, default)
    if value is not None:
        value = int(value)
    return value