@staticmethod
def _parse_flag(flag):
    """parse a flag string.

        May raise:
            ValueError if the flag is unknown.
        """
    if flag == 'PATH':
        return 'path', True
    if flag == 'TAGLESS':
        return 'tagless', True
    raise ValueError('unknown flag: %s' % flag)
