code: def test_all_present_and_up_to_date(package: ModuleType) -> None:
      imported_sorted = sorted(
          attr for attr in dir(package) if not is_dunder(attr)
      )
      all_list = getattr(package, "__all__", None)
      assert (
          all_list is not None
      ), f"Package {package} is missing an explicit __all__."
      all_sorted = sorted(
          attr for attr in all_list if not is_dunder(attr)
      )
      assert imported_sorted == all_sorted, (
          f"{package}.__all__ is outdated."
          f" Imported values are {imported_sorted}, but exported values are {all_list}."
      )
  
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 5 for calling a global function with example usage: test_all_present_and_up_to_date(package) without return types