code: def chebT(ctx, a=1, b=0):
      Tb = [1]
      yield Tb
      Ta = [b, a]
      while 1:
          yield Ta
          # Recurrence: T[n+1](ax+b) = 2*(ax+b)*T[n](ax+b) - T[n-1](ax+b)
          Tmp = [0] + [2 * a * t for t in Ta]
          for i, c in enumerate(Ta):
              Tmp[i] += 2 * b * c
          for i, c in enumerate(Tb):
              Tmp[i] -= c
          Ta, Tb = Tmp, Ta
  
imports: from ..libmp.backend import xrange
  from .calculus import defun
label_desc: Use image node_id 2 for calling a global function with example usage: chebT(ctx, a, b) without return types