def launch_app(
    dataset: fod.Dataset = None,
    view: fov.DatasetView = None,
    sample_id: str = None,
    group_id: str = None,
    spaces: Space = None,
    color_scheme: food.ColorScheme = None,
    plots: fop.PlotManager = None,
    port: int = None,
    address: str = None,
    remote: bool = False,
    browser: str = None,
    height: int = None,
    auto: bool = True,
    config: AppConfig = None,
) -> "Session":
    """Launches the FiftyOne App.

    Note that only one App instance can be opened at a time. If this method is
    called when another App exists, the existing App will be closed.

    Args:
        dataset (None): an optional :class:`fiftyone.core.dataset.Dataset` or
            :class:`fiftyone.core.view.DatasetView` to load
        view (None): an optional :class:`fiftyone.core.view.DatasetView` to
            load
        sample_id (None): an optional :class:`fiftyone.core.sample.Sample` ID
            to load in the modal
        group_id (None): an optional :class:`fiftyone.core.groups.Group` ID
            to load in the modal
        spaces (None): an optional :class:`fiftyone.core.odm.workspace.Space`
            instance defining a space configuration to load
        color_scheme (None): an optional
            :class:`fiftyone.core.odm.dataset.ColorScheme` defining a custom
            color scheme to use
        plots (None): an optional
            :class:`fiftyone.core.plots.manager.PlotManager` to connect to this
            session
        port (None): the port number to serve the App. If None,
            ``fiftyone.config.default_app_port`` is used
        address (None): the address to serve the App. If None,
            ``fiftyone.config.default_app_address`` is used
        remote (False): whether this is a remote session, and opening the App
            should not be attempted
        browser (None): an optional browser to use to open the App. If None,
            the default browser will be used. Refer to list of supported
            browsers at https://docs.python.org/3/library/webbrowser.html
        height (None): an optional height, in pixels, at which to render App
            instances in notebook cells. Only applicable in notebook contexts
        auto (True): whether to automatically show a new App window
            whenever the state of the session is updated. Only applicable
            in notebook contexts
        config (None): an optional :class:`fiftyone.core.config.AppConfig` to
            control fine-grained default App settings

    Returns:
        a :class:`Session`
    """
    global _session  # pylint: disable=global-statement
    _session = Session(
        dataset=dataset,
        view=view,
        sample_id=sample_id,
        group_id=group_id,
        spaces=spaces,
        color_scheme=color_scheme,
        plots=plots,
        port=port,
        address=address,
        remote=remote,
        browser=browser,
        height=height,
        auto=auto,
        config=config,
    )

    if _session.remote:
        logger.info(_REMOTE_INSTRUCTIONS.strip().format(_session.server_port))
    elif focx.is_notebook_context():
        if not auto:
            logger.info(_APP_NOTEBOOK_MESSAGE.strip())
    else:
        logger.info(_APP_WEB_MESSAGE.strip().format(_session.server_port))

    _log_welcome_message_if_allowed()

    return _session
Launches the FiftyOne App.

    Note that only one App instance can be opened at a time. If this method is
    called when another App exists, the existing App will be closed.

    Args:
        dataset (None): an optional :class:`fiftyone.core.dataset.Dataset` or
            :class:`fiftyone.core.view.DatasetView` to load
        view (None): an optional :class:`fiftyone.core.view.DatasetView` to
            load
        sample_id (None): an optional :class:`fiftyone.core.sample.Sample` ID
            to load in the modal
        group_id (None): an optional :class:`fiftyone.core.groups.Group` ID
            to load in the modal
        spaces (None): an optional :class:`fiftyone.core.odm.workspace.Space`
            instance defining a space configuration to load
        color_scheme (None): an optional
            :class:`fiftyone.core.odm.dataset.ColorScheme` defining a custom
            color scheme to use
        plots (None): an optional
            :class:`fiftyone.core.plots.manager.PlotManager` to connect to this
            session
        port (None): the port number to serve the App. If None,
            ``fiftyone.config.default_app_port`` is used
        address (None): the address to serve the App. If None,
            ``fiftyone.config.default_app_address`` is used
        remote (False): whether this is a remote session, and opening the App
            should not be attempted
        browser (None): an optional browser to use to open the App. If None,
            the default browser will be used. Refer to list of supported
            browsers at https://docs.python.org/3/library/webbrowser.html
        height (None): an optional height, in pixels, at which to render App
            instances in notebook cells. Only applicable in notebook contexts
        auto (True): whether to automatically show a new App window
            whenever the state of the session is updated. Only applicable
            in notebook contexts
        config (None): an optional :class:`fiftyone.core.config.AppConfig` to
            control fine-grained default App settings

    Returns:
        a :class:`Session`
    
fiftyone/core/session/session.py