<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def should_stop_early(self) -> bool: """ Returns true if improvement has stopped for long enough. """

        if self._patience is None:
            return False
        else:
            return self._epochs_with_no_improvement >= self._patience