code: def all_subclasses(cls: Any) -> List[Any]:
      """Returns all known (imported) subclasses of a class."""
      classes = cls.__subclasses__() + [
          g for s in cls.__subclasses__() for g in all_subclasses(s)
      ]
  
      return [
          subclass
          for subclass in classes
          if not inspect.isabstract(subclass)
      ]
  
imports: import asyncio
  import functools
  import importlib
  import inspect
  import logging
  from typing import Text, Dict, Optional, Any, List, Callable, Collection, Type
  from rasa.shared.exceptions import RasaException
label_desc: Use image node_id 2 for calling a global function with example usage: all_subclasses(cls) and returns: unknown