@staticmethod
def _split_entry_and_tags(entry):
    """
        Split the entry title (proper) from the trailing tags.

        Tags are separated from the title by a `` -- `` marker:
        anything *before* the marker is the entry title,
        anything *following* it is the (space-separated) set of tags.

        Returns a tuple consisting of entry title and set of tags.
        """
    if ' -- ' in entry:
        entry, tags_bundle = entry.split(' -- ', 1)
        entry = entry.rstrip()
        tags = set(tags_bundle.split())
        if '***' in tags:
            entry += ' ***'
            tags.remove('***')
        elif '**' in tags:
            entry += ' **'
            tags.remove('**')
    else:
        tags = set()
    return entry, tags
