def _iter_all_modules(package, prefix=''):
    if type(package) is not str:
        path, prefix = package.__path__[0], package.__name__ + '.'
    else:
        path = package
    for _, name, is_package in pkgutil.iter_modules([path]):
        if is_package:
            for m in _iter_all_modules(os.path.join(path, name), prefix=name + '.'):
                yield prefix + m
        else:
            yield prefix + name
Iterates over the names of all modules that can be found in the given
dataset/ETHPy150Open pytest-dev/pytest/_pytest/genscript.py/_iter_all_modules