code: def recurse(*cls):
      
      def wrap(f):
          def wrapped_f(tlist):
              for sgroup in tlist.get_sublists():
                  if not isinstance(sgroup, cls):
                      wrapped_f(sgroup)
              f(tlist)
  
          return wrapped_f
  
      return wrap
docs: Function decorator to help with recursion
  
      :param cls: Classes to not recurse over
      :return: function