class_docstr: :param headers:
      An iterable of field-value pairs. Must not contain multiple field names
      when compared case-insensitively.
  
  :param kwargs:
      Additional field-value pairs to pass in to ``dict.update``.
  
  A ``dict`` like container for storing HTTP Headers.
  
  Field names are stored and compared case-insensitively in compliance with
  RFC 7230. Iteration provides the first case-sensitive key seen for each
  case-insensitive pair.
  
  Using ``__setitem__`` syntax overwrites fields that compare equal
  case-insensitively in order to maintain ``dict``'s api. For fields that
  compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
  in a loop.
  
  If multiple fields that are equal case-insensitively are passed to the
  constructor or ``.update``, the behavior is undefined and some will be
  lost.
  
  >>> headers = HTTPHeaderDict()
  >>> headers.add('Set-Cookie', 'foo=bar')
  >>> headers.add('set-cookie', 'baz=quxx')
  >>> headers['content-length'] = '7'
  >>> headers['SET-cookie']
  'foo=bar, baz=quxx'
  >>> headers['Content-Length']
  '7'
docstr: Generic import function for any type of header-like object.
  Adapted version of MutableMapping.update in order to insert items
  with self.add instead of self.__setitem__
docstr_tok: ["Generic","import","function","for","any","type","of","header-like","object",".","Adapted","version","of","MutableMapping.update","in","order","to","insert","items","with","self.add","instead","of","self.__setitem__"]
code: def extend(self, *args, **kwargs):
      """Generic import function for any type of header-like object.
      Adapted version of MutableMapping.update in order to insert items
      with self.add instead of self.__setitem__
      """
      if len(args) > 1:
          raise TypeError(
              "extend() takes at most 1 positional "
              "arguments ({} given)".format(len(args))
          )
      other = args[0] if len(args) >= 1 else ()
  
      if isinstance(other, HTTPHeaderDict):
          for key, val in other.iteritems():
              self.add(key, val)
      elif isinstance(other, Mapping):
          for key in other:
              self.add(key, other[key])
      elif hasattr(other, "keys"):
          for key in other.keys():
              self.add(key, other[key])
      else:
          for key, value in other:
              self.add(key, value)
  
      for key, value in kwargs.items():
          self.add(key, value)
  
imports: import sys
  import requests
label_desc: Use image node_id 13 for calling the HTTPHeaderDict obj's underlying member method code with example usage: obj.extend() without return types