code: def line(x1, y1, x2, y2):
      
  
      x1 = normalize(x1)
      y1 = normalize(y1)
      x2 = normalize(x2)
      y2 = normalize(y2)
  
      xdiff = max(x1, x2) - min(x1, x2)
      ydiff = max(y1, y2) - min(y1, y2)
      xdir = 1 if x1 <= x2 else -1
      ydir = 1 if y1 <= y2 else -1
  
      r = max(xdiff, ydiff)
  
      for i in range(r+1):
          x = x1
          y = y1
  
          if ydiff:
              y += (float(i) * ydiff) / r * ydir
          if xdiff:
              x += (float(i) * xdiff) / r * xdir
  
          yield (x, y)
docs: Returns the coords of the line between (x1, y1), (x2, y2)
  
      :param x1: x coordinate of the startpoint
      :param y1: y coordinate of the startpoint
      :param x2: x coordinate of the endpoint
      :param y2: y coordinate of the endpoint