def print_dict(d, header=''):
    """
    Formats a dictionary for printing.
    :param d: Dictionary to print.
    :return: String containing the formatted dictionary.
    """
    obj_str = str(header) + '{ \n\t'
    obj_str += "\n\t".join([str(key) + ": " + str(d[key]) for key in sorted(d.keys())])
    obj_str += '\n'
    obj_str += '}'
    return obj_str