def METHOD_NAME(self, basedir, modpath):
    for fn in sorted(os.listdir(basedir)):
        path = os.path.join(basedir, fn)
        if os.path.isdir(path):
            pkg_init = os.path.join(path, '__init__.py')
            if os.path.exists(pkg_init):
                yield pkg_init, modpath + fn
                for p, m in self.METHOD_NAME(path, modpath + fn + "."):
                    yield p, m
            continue
        if not fn.endswith('.py') or fn == '__init__.py':
            continue
        yield path, modpath + fn[:-3]