code: def setattrs(obj, **kwargs):
      
      for key, value in kwargs.items():
          setattr(obj, key, value)
      return obj
docs: >>> data = SimpleNamespace()
      >>> setattrs(data, a=1, b=2)  # doctest:+ELLIPSIS
      namespace(a=1, b=2)