def get_key_ordered_dictionary_repr(dictionary, delimiter=': ',
                                    decorator_in='{', decorator_out='}'):
    """Get a string representation of a dictionary ordered by keys.

    Parameters
    ----------
    dictionary : dictionary
        Dictionary to be represented as a string.
    delimiter : string
        Delimiter to put between every key-value pair.
    decorator_in : string
        Decorator to put at the beginning of the string.
    decorator_out : string
        Decorator to put at the end of the string.

    Returns
    -------
    dict_str : string
        String representation of the key-ordered dictionary.

    Notes
    -----
    In the string representation the dictionary keys are displayed ordered by
    their value and properly indented, e.g.
    {
        'key1': value1,
        'key2': value2,
    }

    """
    dict_str = decorator_in
    for key in sorted(dictionary.keys()):
        dict_str += "\n\t'{}'{}{}".format(key, delimiter, dictionary[key])
    dict_str += '\n{}'.format(decorator_out)
    return dict_str