code: def nonterms_iter(self):
      if not self.isleaf():
          yield self
          for c in self.children:
              for n in c.nonterms_iter():
                  yield n
  
imports: import re
  import codecs
  import random
  from collections import Counter
label_desc: Use image node_id 7 for calling the Tree obj's underlying member method code with example usage: obj.nonterms_iter() without return types