def create_or_update_problem(problem):
    """
        Persists given `problem` if no other problem of same `hash` exists in
        the database, updates description, last occurrence date and increments
        occurrence counter either way.
        """
