code: def get_classes_ancestors(classes):
      ancestors = []
      for cls in classes:
          ancestors += cls.__bases__
      filtered_ancestors = []
      for ancestor in ancestors:
          if ancestor.__name__ in ["object"]:
              continue
          filtered_ancestors.append(ancestor)
      if filtered_ancestors:
          return filtered_ancestors + get_classes_ancestors(
              filtered_ancestors
          )
      else:
          return filtered_ancestors
  
imports: from __future__ import print_function
  from __future__ import unicode_literals
  import re
  import inspect
  import os
  import shutil
  import sys
  import rl
  import rl.core
  import rl.processors
  import rl.agents
label_desc: Use image node_id 2 for calling a global function with example usage: get_classes_ancestors(classes) and returns: unknown, filtered_ancestors