def _is_decoy_suffix(psm, suffix='_DECOY'):
    """Given a PSM dict, return :py:const:`True` if all protein names for
    the PSM end with `suffix`, and :py:const:`False` otherwise.

    Parameters
    ----------
    psm : dict
        A dict, as yielded by :py:func:`read`.
    suffix : str, optional
        A suffix used to mark decoy proteins. Default is `'_DECOY'`.

    Returns
    -------
    out : bool
    """
    return all(prot['label'].endswith(suffix) for prot in psm['protein'])