def not_none_sorted(data):
    '\n    Remove all keys where value is None\n\n    :param OrderedDict data: A dictionary with potentially some values set to None\n    :return: The same dictionary without the keys with values to ``None``\n    :rtype: OrderedDict\n    '
    return OrderedDict(((k, v) for (k, v) in sorted(data.items()) if (v is not None)))
Remove all keys where value is None

:param OrderedDict data: A dictionary with potentially some values set to None
:return: The same dictionary without the keys with values to ``None``
:rtype: OrderedDict
def not_none_sorted(data):
    '\n    Remove all keys where value is None\n\n    :param OrderedDict data: A dictionary with potentially some values set to None\n    :return: The same dictionary without the keys with values to ``None``\n    :rtype: OrderedDict\n    '
    return OrderedDict(((k, v) for (k, v) in sorted(data.items()) if (v is not None)))