code: def get_all_dict(module):
      """
      Return a copy of the __all__ dict with irrelevant items removed.
  
      Parameters
      ----------
      module : ModuleType
          The module whose __all__ dict has to be processed
  
      Returns
      -------
      deprecated : list
          List of callable and deprecated sub modules
      not_deprecated : list
          List of non callable or non deprecated sub modules
      others : list
          List of remaining types of sub modules
      """
      if hasattr(module, "__all__"):
          all_dict = copy.deepcopy(module.__all__)
      else:
          all_dict = copy.deepcopy(dir(module))
          all_dict = [
              name for name in all_dict if not name.startswith("_")
          ]
      for name in ["absolute_import", "division", "print_function"]:
          try:
              all_dict.remove(name)
          except ValueError:
              pass
      if not all_dict:
          # Must be a pure documentation module
          all_dict.append("__doc__")
  
      # Modules are almost always private; real submodules need a separate
      # run of refguide_check.
      all_dict = [
          name
          for name in all_dict
          if not inspect.ismodule(getattr(module, name, None))
      ]
  
      deprecated = []
      not_deprecated = []
      for name in all_dict:
          f = getattr(module, name, None)
          if callable(f) and is_deprecated(f):
              deprecated.append(name)
          else:
              not_deprecated.append(name)
  
      others = (
          set(dir(module))
          .difference(set(deprecated))
          .difference(set(not_deprecated))
      )
  
      return not_deprecated, deprecated, others
  
imports: import copy
  import doctest
  import inspect
  import io
  import os
  import re
  import shutil
  import sys
  import tempfile
  import warnings
  import docutils.core
  from argparse import ArgumentParser
  from contextlib import contextmanager, redirect_stderr
  from doctest import NORMALIZE_WHITESPACE, ELLIPSIS, IGNORE_EXCEPTION_DETAIL
  from docutils.parsers.rst import directives
  import sphinx
  import numpy
  from numpydoc.docscrape_sphinx import get_doc_object
  from sphinx.directives.other import SeeAlso, Only
label_desc: Use image node_id 3 for calling a global function with example usage: get_all_dict(module) and returns: not_deprecated,  deprecated,  others