def get_submodule_names(mod: ModuleType) -> Iterable[str]:
    """Get all modules in the given path.

    Args:
        mod: The base module over which to look.
    """

    if isinstance(mod, str):
        if mod == "_mods":
            # Not meant to be imported.
            return
        try:
            mod = importlib.import_module(mod)
        except Exception:
            return

    path = mod.__path__

    yield mod.__name__

    for modname in get_module_names_of_path(path, prefix=mod.__name__ + "."):
        if (
            modname.endswith("._bundle")
            or modname.startswith("trulens.dashboard.pages")
            or modname.endswith("_mods")
        ):
            # Skip _bundle this as it is not a real module/package.

            # Skip trulens.dashboard.pages* because importing them executes a lot of stuff.

            # Skip _mods because it is a special module for static tools is not
            # meant to be imported.

            # TODO: figure out how to prevent it from being installed to begin with.
            continue

        yield modname
Get all modules in the given path.

    Args:
        mod: The base module over which to look.
    
tests/utils.py