def load_fooofgroup(file_name, file_path=None):
    """Load data from file into a FOOOFGroup object.

    Parameters
    ----------
    file_name : str
        File to load data data.
    file_path : str, optional
        Path to directory to load from. If None, loads from current directory.

    Returns
    -------
    fg : FOOOFGroup
        Object with the loaded data.
    """
    from fooof.objs import FOOOFGroup
    fg = FOOOFGroup()
    fg.load(file_name, file_path)
    return fg
