code: def write_kwargs_to_attrs(cls, attrs, **kwargs):
          
          for arg, val in kwargs.items():
              if val is None:
                  val = str(None)
              if isinstance(val, dict):
                  attrs[arg] = val.keys()
                  # just call self again with the dict as kwargs
                  cls.write_kwargs_to_attrs(attrs, **val)
              else:
                  attrs[arg] = val
docs: Writes the given keywords to the given ``attrs``.
  
          If any keyword argument points to a dict, the keyword will point to a
          list of the dict's keys. Each key is then written to the attrs with its
          corresponding value.
  
          Parameters
          ----------
          attrs : an HDF attrs
              The ``attrs`` of an hdf file or a group in an hdf file.
          \**kwargs :
              The keywords to write.