code: def find_modules(root: ModuleType) -> Sequence[ModuleType]:
      root_path = get_module_path(root).parent
      parent = root_path.parent
      result: List[ModuleType] = []
      for path in root_path.glob("**/*.py"):
          relative_path = path.relative_to(parent)
          if relative_path.name == "__init__.py":
              module_name__slashes = str(relative_path.parent)
          else:
              module_name__slashes = str(relative_path)[:-3]
          module_name = module_name__slashes.replace("/", ".")
          result.append(importlib.import_module(module_name))
      return result
  
file_path: GPflow/tests/gpflow/test_all.py
imports: import ast
  import importlib
  from pathlib import Path
  from types import ModuleType
  from typing import Any, List, Optional, Sequence
  import pytest
  import gpflow
label_desc: Use image node_id 4 for calling a global function with example usage: find_modules(root) and returns: result