(kv)
return (isinstance(kv[1], (list, dict, tuple)), kv[0])
Helper function to pass to item_sort_key to sort simple
    elements to the top, then container elements.
Helper function to pass to item_sort_key to sort simple
    elements to the top, then container elements.
Helper function to pass to item_sort_key to sort simple elements to the top then container elements .
def simple_first(kv):
    """Helper function to pass to item_sort_key to sort simple
    elements to the top, then container elements.
    """
    return (isinstance(kv[1], (list, dict, tuple)), kv[0])
def simple_first ( kv ) : return ( isinstance ( kv [ 1 ] , ( list , dict , tuple ) ) , kv [ 0 ] )