Dumps object contents into file on disk.

        Args:
          filename (optional): defaults to self.filename. If passed, self.filename
            will be updated to filename.

def save_as(self, filename=None):
        """
        Dumps object contents into file on disk.

        Args:
          filename (optional): defaults to self.filename. If passed, self.filename
            will be updated to filename.
        """
        if filename is None:
            filename = self.filename
        if filename is None:
            filename = self.default_filename
        if filename is None:
            raise RuntimeError("Class '{}' has no default filename".format(self.__class__.__name__))
        self._do_save_as(filename)
        self.filename = filename