code: def config_writer(self, index=None, write=True):
          
          writer = self._config_parser_constrained(read_only=False)
          if index is not None:
              writer.config._index = index
          writer.config._auto_write = write
          return writer
docs: :return: a config writer instance allowing you to read and write the data
          belonging to this submodule into the .gitmodules file.
  
          :param index: if not None, an IndexFile instance which should be written.
              defaults to the index of the Submodule's parent repository.
          :param write: if True, the index will be written each time a configuration
              value changes.
          :note: the parameters allow for a more efficient writing of the index,
              as you can pass in a modified index on your own, prevent automatic writing,
              and write yourself once the whole operation is complete
          :raise ValueError: if trying to get a writer on a parent_commit which does not
              match the current head commit
          :raise IOError: If the .gitmodules file/blob could not be read