def _create_session_data(database_name_to_path):
    """Create a nested dictionary with info to be passed between and within bokeh apps.

    Args:
        short_name_to_path (dict): mapping from the new unique names to their full path.

    Returns:
        session_data (dict): Infos to be passed between and within apps.
            It contains one entry for the master app and one for each monitoring app.
            The keys of the monitoring app's entries are:
            - last_retrieved (int): last iteration currently in the ColumnDataSource.
            - database_path (str or pathlib.Path)
            - callbacks (dict): dictionary to be populated with callbacks.

    """
    session_data = {"master_app": {}}
    for database_name, database_path in database_name_to_path.items():
        session_data[database_name] = {
            "last_retrieved": 0,
            "database_path": database_path,
            "callbacks": {},
        }
    return session_data