:param dict_: dict of OrderedDict to be processed
        :return: list of str of keys in the original order
            or in alphabetical order
195647
def _ordered_keys(dict_):
        
        return isinstance(dict_, OrderedDict) and dict_.keys() or \
               dict_ and sorted(dict_.keys()) or []
193261
def sort_dict(d, desc=True):

    

    sort = sorted(d.items(), key=lambda x: x[1], reverse=desc)
    return OrderedDict(sort)
1057868
def to_param_dict(self):
        
        param_dict = {}
        for index, dictionary in enumerate(self.value):
            for key, value in dictionary.items():
                param_name = '{param_name}[{index}][{key}]'.format(
                                                    param_name=self.param_name,
                                                    index=index,
                                                    key=key)
                param_dict[param_name] = value
        return OrderedDict(sorted(param_dict.items()))
548732
def to_list(self):
        """"""

        ret = OrderedDict()
        for attrname in self.attrs:
            ret[attrname] = self.__getattribute__(attrname)
        return ret
228871
def from_jsondict(cls, dict_):
        
        fields = [ofproto.oxs_from_jsondict(f) for f
                  in dict_['oxs_fields']]
        return OFPStats(_ordered_fields=fields)
1263639
def _ordereddict2dict(input_ordered_dict):
    '''
    
    '''
    return salt.utils.json.loads(salt.utils.json.dumps(input_ordered_dict))
772049
def _ordered(self, odict):
        """"""
        ndict = OrderedDict()

        if isinstance(odict, CatDict) or isinstance(odict, Entry):
            key = odict.sort_func
        else:
            key = None

        nkeys = list(sorted(odict.keys(), key=key))
        for key in nkeys:
            if isinstance(odict[key], OrderedDict):
                odict[key] = self._ordered(odict[key])
            if isinstance(odict[key], list):
                if (not (odict[key] and
                         not isinstance(odict[key][0], OrderedDict))):
                    nlist = []
                    for item in odict[key]:
                        if isinstance(item, OrderedDict):
                            nlist.append(self._ordered(item))
                        else:
                            nlist.append(item)
                    odict[key] = nlist
            ndict[key] = odict[key]

        return ndict
439966
def to_dict(self):
        """"""
        ret = OrderedDict()
        for attrname in self.attrs:
            ret[attrname] = self.__getattribute__(attrname)
        return ret
578551
def expr_order_key(expr):
    """"""
    if hasattr(expr, '_order_key'):
        return expr._order_key
    try:
        if isinstance(expr.kwargs, OrderedDict):
            key_vals = expr.kwargs.values()
        else:
            key_vals = [expr.kwargs[key] for key in sorted(expr.kwargs)]
        return KeyTuple((expr.__class__.__name__, ) +
                        tuple(map(expr_order_key, expr.args)) +
                        tuple(map(expr_order_key, key_vals)))
    except AttributeError:
        return str(expr)
80084
def keys(self):
        
        keys = []
        for key, value in self._values.items():
            if isinstance(value, (FlatDict, dict)):
                nested = [self._delimiter.join([key, k]) for k in value.keys()]
                keys += nested if nested else [key]
            else:
                keys.append(key)
        return sorted(keys)
930401
def to_dict(self) -> OrderedDict:
        
        result = OrderedDict()
        result["adaptive"] = self._adaptive
        result["binning_type"] = type(self).__name__
        self._update_dict(result)
        return result
264108
def _asdict(self):
        """"""
        return OrderedDict((f.name, getattr(self, f.name))
                           for f in self._struct)
705518
def get_order_key(self, **kwargs):
        
        # get the mapping enumeration class from Meta class
        mapping = self.mapping
        # use the first element in the enumeration as default order column
        order_column = kwargs.get('order[0][column]',
                                  [mapping.keys()[0]])[0]
        order_column = ensure(int, order_column, mapping.keys()[0])
        order = kwargs.get('order[0][dir]', ['asc'])[0]

        order_key = mapping.from_key(order_column).label
        # django orm '-' -> desc
        if order == 'desc':
            order_key = '-' + order_key
        return order_key
39195
def sorted_dict_repr(d):
    
    keys = list(d.keys())
    keys.sort()
    return "{" + ", ".join(["%r: %r" % (k, d[k]) for k in keys]) + "}"
500780
def keys(self):
        
        k = list(dict.keys(self))
        k.sort()
        return k
668662
def serialize_dict_keys(d, prefix=""):
    
    keys = []
    for k, v in d.iteritems():
        fqk = '%s%s' % (prefix, k)
        keys.append(fqk)
        if isinstance(v, dict):
            keys.extend(serialize_dict_keys(v, prefix="%s." % fqk))

    return keys
986169
def _sort(self):
        
        self.versions = OrderedDict(sorted(self.versions.items(), key=lambda v: v[0]))