def METHOD_NAME(client, edit, invitation):
    journal = openreview.journal.Journal()
    note=edit.note
    submission = client.get_note(note.forum)
    venue_id = journal.venue_id
    ## Notify readers
    journal.notify_readers(edit)
    ## Decrease pending reviews counter
    signature_group = client.get_group(id=note.signatures[0])
    edges = client.get_edges(invitation=journal.get_reviewer_pending_review_id(), tail=signature_group.members[0])
    if edges and edges[0].weight > 0:
        pending_review_edge = edges[0]
        if note.ddate:
            pending_review_edge.weight += 1
        else:
            pending_review_edge.weight -= 1
        client.post_edge(pending_review_edge)
    ## On update or delete return
    if note.tcdate != note.tmdate:
        print('Review edited, exit')
        return
    ## Expire ack task
    journal.invitation_builder.expire_invitation(journal.get_reviewer_assignment_acknowledgement_id(number=submission.number, reviewer_id=signature_group.members[0]))
    review_note=client.get_note(note.id)
    if journal.get_release_review_id(number=note.number) in review_note.invitations:
        print('Review already released, exit')
        return
    reviews=client.get_notes(forum=note.forum, invitation=edit.invitation)
    print(f'Reviews found {len(reviews)}')
    number_of_reviewers = journal.get_number_of_reviewers()
    if len(reviews) == number_of_reviewers:
        print('Release reviews...')
        invitation = journal.invitation_builder.set_note_release_review_invitation(submission)
        print('Release comments...')
        invitation = journal.invitation_builder.set_note_release_comment_invitation(submission)
        ## Enable official recommendation
        print('Enable official recommendations')
        cdate = journal.get_due_date(weeks = journal.get_discussion_period_length())
        duedate = cdate + datetime.timedelta(weeks = journal.get_recommendation_period_length())
        journal.invitation_builder.set_note_official_recommendation_invitation(submission, cdate, duedate)
        assigned_action_editor = client.search_profiles(ids=[submission.content['assigned_action_editor']['value']])[0]
        review_visibility = 'public' if journal.is_submission_public() else 'visible to all the reviewers'
        ## Send email notifications to authors
        print('Send emails to authors')
        client.post_message(
            recipients=[journal.get_authors_id(number=submission.number)],
            subject=f'''[{journal.short_name}] Reviewer responses and discussion for your {journal.short_name} submission''',
            message=f'''Hi {{{{fullname}}}},