code: def extend(self, *args, **kwargs):
          
          if len(args) > 1:
              raise TypeError('expected at most 1 arguments, got %d' % len(args))
  
          iterable = args[0] if args else None
          if iterable:
              if isinstance(iterable, Mapping) or hasattr(iterable, 'items'):
                  for key, value in iterable.items():
                      self.append(key, value)
              elif hasattr(iterable, 'keys'):
                  for key in iterable.keys():
                      self.append(key, iterable[key])
              else:
                  for key, value in iterable:
                      self.append(key, value)
  
          for key, value in kwargs.items():
              self.append(key, value)
docs: Add key value pairs for an iterable.