def parse_kstar(kstar):
    """
    Parses the kstar string labels into kstar values
    to select merger types

    Parameters
    ----------
    kstar : `string`
        specifies the merger types for the primary and secondary stars
        where kstar = '13_14' contains both NSs and BHs
        and kstar = '13' just contains NSs

    Returns
    -------
    kstar_list : `list`
        list which can be used to select mergers of interest from COSMIC data
    """

    if len(kstar) == 2:
        kstar_list = [int(kstar)]
    else:
        kstar_hi = int(kstar[:2])
        kstar_lo = int(kstar[3:])
        kstar_list = range(kstar_hi, kstar_lo + 1)

    return kstar_list