async def METHOD_NAME(self, root, subdir=""):
    entry_dict = dict()
    for de in os.scandir(os.path.join(root, subdir)):
        if de.name.startswith("."):
            continue
        if de.is_file() and de.name.endswith(".py"):
            filename = os.path.join(subdir, de.name)
            try:
                await self.process_file(entry_dict, root, filename)
            except Exception as exc:
                logger.warning("Skipping file '%s'", filename,
                    exc_info=not isinstance(exc, WorkerInternalException))
                # restart worker
                await self.worker.close()
                self.worker = Worker(self.worker_handlers)
        if de.is_dir():
            subentries = await self.METHOD_NAME(
                root, os.path.join(subdir, de.name))
            entries = {de.name + "/" + k: v for k, v in subentries.items()}
            entry_dict.update(entries)
    return entry_dict