def dict_repr(obj):
    """
    Creates an unambiguous and consistent representation of a dictionary.

    Args:
        obj: The dictionary to produce the representation of

    Returns:
        The string representation
    """
    result = '{'
    for key in sorted(obj):
        elem = obj[key]
        if isinstance(elem, dict):
            result += repr(key) + ': ' + dict_repr(elem) + ', '
        else:
            result += repr(key) + ': ' + repr(elem) + ', '
    if result.endswith(', '):
        result = result[0:-2]
    result += '}'
    return result