def has_modification(monosaccharide, modification):
    """Checks whether ``monosaccharide`` has any modification sites
    matching ``modification``.

    Parameters
    ----------
    monosaccharide : :class:`~.Monosaccharide`
        The monosaccharide to check
    modification : :class:`~.constants.Modification` or :class:`str`
        The modification to check for

    Returns
    -------
    :class:`bool`
    """
    for position, mod in monosaccharide.modifications.items():
        if mod == modification:
            return True
    return False