'Helper function to format and quote a single header.
Useful for single headers that are composed of multiple items. E.g.,
\'Content-Disposition\' fields.
:param header_parts:
A sequence of (k, v) typles or a :class:`dict` of (k, v) to format
as `k1="v1"; k2="v2"; ...`.'

def _render_parts(self, header_parts):

    parts = []
    iterable = header_parts
    if isinstance(header_parts, dict):
        iterable = header_parts.items()
    for (name, value) in iterable:
        if value:
            parts.append(self._render_part(name, value))
    return ';    '.join(parts)
