code: def rec_test(sequence, test_func):
      """Tests test_func on all items of sequence and items of included
      sub-iterables"""
      for x in sequence:
          if isinstance(x, (list, tuple)):
              for y in rec_test(x, test_func):
                  yield y
          else:
              yield test_func(x)
  
file_path: catboost/contrib/tools/python/src/Lib/lib2to3/btm_utils.py
imports: from .None import pytree
  from .pgen2 import grammar, token
  from .pygram import pattern_symbols, python_symbols
label_desc: Use image node_id 3 for calling a global function with example usage: rec_test(sequence, test_func) without return types