def save(self, filename=None):
        filename = Path(filename) if filename is not None else self.filename
        with filename.open("w") as f:
            f.write(self.yaml)
def __init__(self, *args: Any, **kwargs: Any) -> None:
        self._smref: Union['ReferenceType[Submodule]', None] = None
        self._index = None
        self._auto_write = True
        super(SubmoduleConfigParser, self).__init__(*args, **kwargs)