def key_fn(item):
    (version, info) = item
    return (info.get('preferred', False), (not version.isdevelop()), version)
def key_fn(item):
    (version, info) = item
    return (info.get('preferred', False), (not version.isdevelop()), version)