<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_int(self, number, default=0):
 """Returns an integer """

        try:
            return int(number)
        except (KeyError, ValueError):
            return self.to_int(default, 0)