code: def findbases(kls, topclass):
      retval = list()
      for base in kls.__bases__:
          if issubclass(base, topclass):
              retval.extend(findbases(base, topclass))
              retval.append(base)
  
      return retval
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from collections import OrderedDict
  import itertools
  import sys
  import backtrader
  from .utils.py3 import zip, string_types, with_metaclass
label_desc: Use image node_id 1 for calling a global function with example usage: findbases(kls, topclass) and returns: retval