def format_dict(dic, indent=0):
    """
    Formats dictionary as a string of key value pairs. Each pair is printed on
    a new line.
    """
    msg = ""
    for param_name, param_value in dic.items():
        msg += ' ' * indent + (param_name + ": " + str(param_value) + '\n')
    return msg