code: def symbol_gen(sym_str):
      """Symbol generator
  
      Generates sym_str_n where n is the number of times the generator
      has been called.
      """
      n = 0
      while True:
          yield Symbol("%s_%d" % (sym_str, n))
          n += 1
  
imports: from sympy import Matrix, pprint, Rational, symbols, Symbol, zeros
label_desc: Use image node_id 1 for calling a global function with example usage: symbol_gen(sym_str) without return types