def drop_temporary(pr: PullRequestDetails,
                   problem: Optional[CannotAutomergeError],
                   prev_seen_times: Dict[int, datetime.datetime],
                   next_seen_times: Dict[int, datetime.datetime],
                   ) -> Optional[CannotAutomergeError]:
    """Filters out problems that may be temporary."""

    if problem is not None and problem.may_be_temporary:
        since = prev_seen_times.get(pr.pull_id, datetime.datetime.utcnow())
        if is_recent_date(since):
            next_seen_times[pr.pull_id] = since
            return None

    return problem