code: def _all_subclasses(cls):
      subclasses = set(cls.__subclasses__())
      return subclasses.union(
          *[_all_subclasses(subclass) for subclass in subclasses]
      )
  
imports: from __future__ import annotations
  import copy
  import dataclasses
  import importlib
  import json
  import os.path
  from pathlib import Path
  import socket
  from typing import TYPE_CHECKING, get_type_hints
  import typeguard
  import nni.runtime.config
  from .public import is_missing
label_desc: Use image node_id 13 for calling a global function with example usage: _all_subclasses(cls) and returns: subclasses