code: def _get_deps_info(
      optional: bool = False, logger: Optional[logging.Logger] = None
  ):
      """
      Overview of the installed version of dependencies.
  
      Parameters
      ----------
      optional : bool, optional
          If False returns the required library versions, if True, returns
          optional library versions, by default False.
  
      Returns
      -------
      deps_info: dict
          version information on relevant Python libraries
      """
  
      deps_info = {}
  
      if optional:
          deps = optional_deps
      else:
          deps = required_deps
  
      for modname in deps:
          try:
              ver = get_module_version(modname)
              if not ver:
                  ver = "Installed but version unavailable"
          except ValueError:
              ver = "Not installed"
          deps_info[modname] = str(ver)
  
      return deps_info
  
imports: import logging
  import platform
  import sys
  from typing import Optional
  from pycaret.utils._dependencies import get_module_version
label_desc: Use image node_id 2 for calling a global function with example usage: _get_deps_info(optional, logger) and returns: deps_info