<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def folders(self):
 """Return a map of the subfolder objects for this folder. This is a snapshot of the folder list at the time the call was made. It does not update over time. The map contains MdFolder objects: maildir.folders()["Sent"] might retrieve the folder .Sent from the maildir. """

        entrys = self.filesystem.listdir(abspath(self._foldername()))
        regex = re.compile("\\..*")
        just_dirs = dict([(d,d) for d in entrys if regex.match(d)])

        folder = self._foldername()
        filesystem = self.filesystem

        class FolderList(object):
            def __iter__(self):
                dirs = list(just_dirs.keys())
                dirs.sort()
                dirs.reverse()
                for dn in dirs:
                    yield MdFolder(
                        dn[1:],
                        base=folder,
                        subfolder=True,
                        filesystem=filesystem
                        )
                return

            def __list__(self):
                return [dn[1:] for dn in just_dirs]

            def __contains__(self, name):
                return just_dirs.__contains__(".%s" % name)

            def __getitem__(self, name):
                return MdFolder(
                    just_dirs[".%s" % name][1:],
                    base=folder,
                    subfolder=True,
                    filesystem=filesystem
                    )

        f = FolderList()
        return f