def format_text(self, state: dict[str, int]) -> str:
        """Converts the state of the subfolders to a string

        Parameters
        ==========
        state: dict[str, int]
            a dictionary mapping subfolder labels to new mail values

        Returns
        =======
        a string representation of the given state
        """
        if self.total:
            return self._format_one(self.sub_folders[0]["label"], sum(state.values()))
        else:
            return self.separator.join(self._format_one(*item) for item in state.items())
Converts the state of the subfolders to a string

        Parameters
        ==========
        state: dict[str, int]
            a dictionary mapping subfolder labels to new mail values

        Returns
        =======
        a string representation of the given state
        
libqtile/widget/maildir.py