def get_moviepy_modules():
    """Get all moviepy module names and if each one is a package."""
    response = []
    with contextlib.redirect_stdout(io.StringIO()):
        moviepy_module = importlib.import_module("moviepy")

        modules = pkgutil.walk_packages(
            path=moviepy_module.__path__,
            prefix=moviepy_module.__name__ + ".",
        )

        for importer, modname, ispkg in modules:
            response.append((modname, ispkg))
    return response
Get all moviepy module names and if each one is a package.
tests/conftest.py