def key_from_underscore_prefixed_string(s):
    """Converts a string to a key such that strings prefixed with an underscore
    will be sorted before other strings."""
    return not s.startswith('_'), s