code: def add_header(self, key, value, **params):
          
  
          key = self.escape(key)
          ci_key = key.casefold()
  
          def quoted_params(items):
              for p in items:
                  param_name = self.escape(p[0])
                  param_val = self.de_quote(self.escape(p[1]))
                  yield param_name, param_val
  
          sorted_items = sorted(params.items())
  
          quoted_iter = ('%s="%s"' % p for p in quoted_params(sorted_items))
          param_str = ' '.join(quoted_iter)
  
          if param_str:
              value = "%s; %s" % (value, param_str)
  
          self._header_data[ci_key] = (key, value)
docs: Add a header to the collection, including potential parameters.
  
          Args:
              key (str): The name of the header
              value (str): The value to store under that key
              params: Option parameters to be appended to the value,
                  automatically formatting them in a standard way