#NEWLINE# def not_none_sorted( data ) : #NEWLINE# #INDENT# '\n    Remove all keys where value is None\n\n    :param OrderedDict data: A dictionnary with potentialy some values set to None\n    :return: The same dictionnary without the keys with values to ``None``\n    :rtype: OrderedDict\n    ' #NEWLINE# ordered_items = OrderedDict ( sorted ( iteritems ( data ) ) ) #NEWLINE# return OrderedDict ( ( ( k , v ) for ( k , v ) in iteritems ( ordered_items ) if ( v is not None ) ) )