import collections


def _order_dict_by_key(rdict):
    """Convert a dictionary into an OrderedDict sorted by key.

    :param rdict: Dictionary to be ordered.
    :type rdict: dict
    :returns: Ordered Dictionary.
    :rtype: collections.OrderedDict
    """
    return collections.OrderedDict(sorted(rdict.items(), key=lambda k: k[0]))