from typing import OrderedDict


def sort_dict(d):
    """Return an OrderedDict like `d` but with sorted keys.

    Parameters
    ----------
    d : mapping

    Returns
    -------
    od : OrderedDict

    """
    return OrderedDict([(k, d[k]) for k in sorted(d.keys())])