def filter_dataset(
    dataset: pd.DataFrame,
    summary_column: str,
    name_column: str,
    process_all: bool = False,
) -> pd.DataFrame:
    """
    Filter dataset to include only rows with missing summaries but valid names.

    Parameters:
        dataset (pd.DataFrame): The dataset containing instrument information.
        summary_column (str): Column name containing summaries/descriptions.
        name_column (str): Column name containing instrument names.
        process_all (bool, optional): Process all rows regardless of summary status.
                                      Defaults to False.

    Returns:
        pd.DataFrame: Filtered dataset containing only instruments with missing descriptions
                     but valid names, or all instruments with valid names if process_all is True.
    """
    if process_all:
        return dataset[~dataset[name_column].isna()]

    return dataset[dataset[summary_column].isna() & ~dataset[name_column].isna()]

    Filter dataset to include only rows with missing summaries but valid names.

    Parameters:
        dataset (pd.DataFrame): The dataset containing instrument information.
        summary_column (str): Column name containing summaries/descriptions.
        name_column (str): Column name containing instrument names.
        process_all (bool, optional): Process all rows regardless of summary status.
                                      Defaults to False.

    Returns:
        pd.DataFrame: Filtered dataset containing only instruments with missing descriptions
                     but valid names, or all instruments with valid names if process_all is True.
    
parsers/descriptions_controller.py