code: def fn_autodoc(out_filename, generated_path, references):
      all_modules_str = ".. toctree::\n   :hidden:\n\n"
      all_modules = get_modules(fn_modules)
      for module in all_modules:
          dali_module = sys.modules[module]
          # Take all public members of given module
          funs_in_module = get_functions(dali_module)
          if len(funs_in_module) == 0:
              continue
  
          # As the top-level file is included from a directory above generated_path
          # we need to provide the relative path to the per-module files
          # the rest is within the same directory, so there is no need for that
          all_modules_str += f"   {generated_path / module}\n"
  
          single_module_str = single_module_file(
              module, funs_in_module, references
          )
          with open(
              generated_path / (module + ".rst"), "w"
          ) as module_file:
              module_file.write(single_module_str)
  
          for fun in funs_in_module:
              full_name = f"{module}.{fun}"
              if (
                  module in exclude_fn_members
                  and fun in exclude_fn_members[module]
              ):
                  continue
              with open(
                  generated_path / (full_name + ".rst"), "w"
              ) as function_file:
                  single_file_str = single_fun_file(
                      full_name, references
                  )
                  function_file.write(single_file_str)
  
      with open(out_filename, "w") as f:
          f.write(all_modules_str)
  
file_path: DALI/docs/autodoc_submodules.py
imports: import nvidia.dali.plugin.pytorch
  import nvidia.dali.plugin.numba
  import inspect
  import sys
  import operations_table
label_desc: Use image node_id 9 for calling a global function with example usage: fn_autodoc(out_filename, generated_path, references) without return types