def to_maildir(self, flags: Iterable[Union[bytes, Flag]]) -> str:
        """Return the string of letter codes that are used to map to defined
        IMAP flags and keywords.

        Args:
            flags: The flags and keywords to map.

        """
        codes = []
        for flag in flags:
            if isinstance(flag, bytes):
                flag = Flag(flag)
            from_sys = self._from_sys.get(flag)
            if from_sys is not None:
                codes.append(from_sys)
            else:
                from_kwd = self._from_kwd.get(flag)
                if from_kwd is not None:
                    codes.append(from_kwd)
        return ''.join(codes)
def to_maildir ( self , flags : Iterable [ Union [ bytes , Flag ] ] ) -> str : codes = [ ] for flag in flags : if isinstance ( flag , bytes ) : flag = Flag ( flag ) from_sys = self . _from_sys . get ( flag ) if from_sys is not None : codes . append ( from_sys ) else : from_kwd = self . _from_kwd . get ( flag ) if from_kwd is not None : codes . append ( from_kwd ) return '' . join ( codes )
Return the string of letter codes that are used to map to defined
        IMAP flags and keywords.

        Args:
            flags: The flags and keywords to map.