def _frac_scorer(matched_hs_ions_df, all_hyp_ions_df, N_spectra):
    """Fraction ion observed scorer.

    Provides a score based off of the fraction of hypothetical ions that were observed
    for a given hypothetical structure.

    Parameters
    ----------
    matched_hs_ions_df : pd.DataFrame
        Dataframe of observed ions that matched a specific hypothetical structure
    all_hyp_ions_df : pd.DataFrame
        Dataframe of all possible ions for a given hypothetical structure.
    N_spectra : int
        Number of spectra provided.

    Returns
    -------
    float
        Score for a given hypothetical structure.
    """

    # Calculate the number of matched ions observed and total possible
    N_matched_hs_ions = matched_hs_ions_df.shape[0]
    N_tot_hyp_ions = all_hyp_ions_df.shape[0]
    
    score = N_matched_hs_ions / (N_tot_hyp_ions*N_spectra)

    return score