<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_header_dict(response, header, header_dict):
 """Formats and sets a header dict in a response, inververs of get_header_dict."""

    def dictvalue(t):
        if t[1] is True:
            return t[0]
        return t[0] + '=' + smart_str(t[1])

    response[header] = ', '.join([dictvalue(el) for el in header_dict.items()])