def handle_app_initializer(subscription: str, initializer: AppInitializer):
    """Handle an App initialization request

    Args:
        subscription: a subscription id
        initializer: an app initializer

    Returns:
        ``None`` or a coroutine
    """
    increment_app_count()
    state = get_state()
    current = state.dataset.name if state.dataset is not None else None

    update = False
    dataset_change = False
    if initializer.dataset and initializer.dataset != current:
        update = True
        dataset_change = True
        handle_dataset_change(state, initializer)
    elif state.dataset is not None:
        update = handle_group_id(state, initializer.group_id)
        update = handle_group_slice(state, initializer.group_slice)
        update = handle_sample_id(state, initializer.sample_id)
        update = handle_saved_view(state, initializer.view) or update
        update = handle_workspace(state, initializer.workspace) or update

    if not update:
        return None

    if dataset_change:
        state.color_scheme = fos.build_color_scheme(
            None, state.dataset, state.config
        )

    return dispatch_event(subscription, StateUpdate(state))
Handle an App initialization request

    Args:
        subscription: a subscription id
        initializer: an app initializer

    Returns:
        ``None`` or a coroutine
    
fiftyone/server/events/initialize.py