<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_int(text, fallback=None):
 """ Try to extract an integer from a string, return the fallback if that's not possible. """

    try:
        if isinstance(text, six.integer_types):
            return text
        elif isinstance(text, six.string_types):
            return int(text)
        else:
            return fallback
    except ValueError:
        return fallback