def format_dict(data):
    """Return a formatted string.

    :param data: a dict
    :rtype: a string formatted to {a:b, c:d}
    """
    if not isinstance(data, dict):
        return str(data)
    return str({str(key): str(value) for key, value in data.items()})