brainstorm/utils.py
def sort_by_index_key(x):
    """
    Used as key in sorted() to order items of a dictionary by the @index
    entries in its child-dicts if present.
    """
    if isinstance(x[1], dict) and '@index' in x[1]:
        return x[1]['@index']
    else:
        return -1

    Used as key in sorted() to order items of a dictionary by the @index
    entries in its child-dicts if present.
    
Used as key in sorted() to order items of a dictionary by the @index
entries in its child-dicts if present.
Used as key in sorted () to order items of a dictionary by the @index entries in its child - dicts if present .
def sort_by_index_key(x):
    if isinstance(x[1], dict) and '@index' in x[1]:
        return x[1]['@index']
    else:
        return -1
def sort_by_index_key ( x ) : if isinstance ( x [ 1 ] , dict ) and '@index' in x [ 1 ] : return x [ 1 ] [ '@index' ] else : return - 1
Used as key in sorted() to order items of a dictionary by the @index
entries in its child-dicts if present.
Used as key in sorted () to order items of a dictionary by the @index entries in its child - dicts if present .
"""
    Used as key in sorted() to order items of a dictionary by the @index
    entries in its child-dicts if present.
    """
x