def initialize_listener_sync(payload: ListenPayload):
    """Synchronously initializer a listener

    Args:
        payload: a :class:`fiftyone.core.session.events.ListenPayload`
    """
    if isinstance(payload.initializer, AppInitializer):
        return (
            handle_app_initializer(payload.subscription, payload.initializer),
            True,
            get_state(),
        )

    state = payload.initializer
    return (
        dispatch_event(payload.subscription, StateUpdate(payload.initializer)),
        False,
        state,
    )
Synchronously initializer a listener

    Args:
        payload: a :class:`fiftyone.core.session.events.ListenPayload`
    
fiftyone/server/events/initialize.py