code: def _find_exports(module):
      members = inspect.getmembers(module)
      attributes = {
          member[0]
          for member in members
          if _is_attribute(member[1], module)
      }
      public_attributes = list(
          filter(
              lambda attribute: not attribute.startswith("_"),
              attributes,
          )
      )
      exports = {
          attribute: module.__name__ for attribute in public_attributes
      }
  
      if (
          module.__file__ is not None
          and "__init__.py" in module.__file__
      ):
          root = os.path.dirname(module.__file__)
          submodule_paths = os.listdir(root)
          submodule_paths = [
              path
              for path in submodule_paths
              if not path.startswith("_")
          ]
          submodules = [
              path.replace(".py", "")
              for path in submodule_paths
              if os.path.isdir(os.path.join(root, path))
              or path.endswith(".py")
          ]
          for submodule in submodules:
              deeper_exports = _find_exports(
                  importlib.import_module(
                      f".{submodule}", module.__name__
                  )
              )
              exports = {**deeper_exports, **exports}
  
      return exports or {}
  
file_path: pytorch-lightning/tests/tests_app/test_imports.py
imports: import importlib
  import inspect
  import os
  import types
  from typing import TypeVar
  import lightning.app
label_desc: Use image node_id 2 for calling a global function with example usage: _find_exports(module) and returns: unknown