<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _remove_stashed_checkpoints(self, till_3pc_key=None):
 """ Remove stashed received checkpoints up to `till_3pc_key` if provided, otherwise remove all stashed received checkpoints """

        if till_3pc_key is None:
            self.stashedRecvdCheckpoints.clear()
            self.logger.info('{} removing all stashed checkpoints'.format(self))
            return

        for view_no in list(self.stashedRecvdCheckpoints.keys()):

            if view_no < till_3pc_key[0]:
                self.logger.info('{} removing stashed checkpoints for view {}'.format(self, view_no))
                del self.stashedRecvdCheckpoints[view_no]

            elif view_no == till_3pc_key[0]:
                for (s, e) in list(self.stashedRecvdCheckpoints[view_no].keys()):
                    if e <= till_3pc_key[1]:
                        self.logger.info('{} removing stashed checkpoints: '
                                         'viewNo={}, seqNoStart={}, seqNoEnd={}'.
                                         format(self, view_no, s, e))
                        del self.stashedRecvdCheckpoints[view_no][(s, e)]
                if len(self.stashedRecvdCheckpoints[view_no]) == 0:
                    del self.stashedRecvdCheckpoints[view_no]