<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def overtimes(self):
 """ Returns an ``int`` of the number of overtimes that were played during the game and 0 if the game finished at the end of regulation time. """

        if self._overtimes == '' or self._overtimes is None:
            return 0
        if self._overtimes.lower() == 'ot':
            return 1
        num_overtimes = re.findall(r'\d+', self._overtimes)
        try:
            return int(num_overtimes[0])
        except (ValueError, IndexError):
            return 0