def METHOD_NAME(event_session, data):
    """Update a session based on the information in the `data`."""
    event_session.populate_from_dict(data)
    db.session.flush()
    signals.event.session_updated.send(event_session)
    event_session.event.log(EventLogRealm.management, LogKind.change, 'Sessions',
                            f'Session "{event_session.title}" has been updated', session.user,
                            meta={'session_id': event_session.id})
    logger.info('Session %s modified by %s', event_session, session.user)