code: def all_functions():
      """Get a list of all functions from `sklearn`.
  
      Returns
      -------
      functions : list of tuples
          List of (name, function), where ``name`` is the function name as
          string and ``function`` is the actual function.
      """
      # lazy import to avoid circular imports from sklearn.base
      from ._testing import ignore_warnings
  
      all_functions = []
      root = str(Path(__file__).parent.parent)  # sklearn package
      # Ignore deprecation warnings triggered at import time and from walking
      # packages
      with ignore_warnings(category=FutureWarning):
          for _, module_name, _ in pkgutil.walk_packages(
              path=[root], prefix="sklearn."
          ):
              module_parts = module_name.split(".")
              if (
                  any(
                      part in _MODULE_TO_IGNORE for part in module_parts
                  )
                  or "._" in module_name
              ):
                  continue
  
              module = import_module(module_name)
              functions = inspect.getmembers(
                  module, _is_checked_function
              )
              functions = [
                  (func.__name__, func)
                  for name, func in functions
                  if not name.startswith("_")
              ]
              all_functions.extend(functions)
  
      # drop duplicates, sort for reproducibility
      # itemgetter is used to ensure the sort does not extend to the 2nd item of
      # the tuple
      return sorted(set(all_functions), key=itemgetter(0))
  
file_path: catboost/contrib/python/scikit-learn/py3/sklearn/utils/discovery.py
imports: import inspect
  import pkgutil
  from importlib import import_module
  from operator import itemgetter
  from pathlib import Path
label_desc: Use image node_id 4 for calling a global function with example usage: all_functions() and returns: sorted