code: def list_components():
      import pkg_resources
      from fate.components.components import LazyBuildInComponentsLoader
  
      build_in_components = LazyBuildInComponentsLoader().list()
      third_parties_components = []
  
      for cpn_ep in pkg_resources.iter_entry_points(
          group="fate.ext.component_desc"
      ):
          try:
              candidate_cpn = cpn_ep.load()
              candidate_cpn_name = candidate_cpn.name
              third_parties_components.append([candidate_cpn_name])
          except Exception as e:
              logger.warning(
                  f"register cpn from entrypoint(named={cpn_ep.name}, module={cpn_ep.module_name}) failed: {e}"
              )
              continue
      return dict(
          buildin=build_in_components,
          thirdparty=third_parties_components,
      )
  
imports: import logging
  import typing
  from typing import Optional
label_desc: Use image node_id 3 for calling a global function with example usage: list_components() and returns: dict