def decorate(test, decorator):
 try:
  tests = iter(test)
 except TypeError:
  return decorator(test)
 _clearSuite(test)
 for case in tests:
  test.addTest(decorate(case, decorator))
 return test

def decorate ( test , decorator ) : try : tests = iter ( test ) except TypeError : return decorator ( test ) _clearSuite ( test ) for case in tests : test . addTest ( decorate ( case , decorator ) ) return test
add metedata next to a node .