def METHOD_NAME(account_id, event_id, extra_args):
    with session_scope(account_id) as db_session:
        account = db_session.query(Account).get(account_id)
        event = db_session.query(Event).get(event_id)
        # Update our copy of the event before sending it.
        if "event_data" in extra_args:
            data = extra_args["event_data"]
            for attr in Event.API_MODIFIABLE_FIELDS:
                if attr in extra_args["event_data"]:
                    setattr(event, attr, data[attr])
            event.sequence_number += 1
        # It doesn't make sense to update or delete an event we imported from
        # an iCalendar file.
        if event.calendar == account.emailed_events_calendar:
            return
        remote_update_event = module_registry[account.provider].remote_update_event
        remote_update_event(account, event, db_session, extra_args)
        notify_participants = extra_args.get("notify_participants", False)
        if notify_participants and account.provider != "gmail":
            ical_file = generate_icalendar_invite(event).to_ical()
            send_invite(ical_file, event, account, invite_type="update")
        db_session.commit()