code: def _collect_lines(self,diffs):
          
  
          fromlist,tolist,flaglist = [],[],[]
          # pull from/to data and flags from mdiff style iterator
          for fromdata,todata,flag in diffs:
              try:
                  # store HTML markup of the lines into the lists
                  fromlist.append(self._format_line(0,flag,*fromdata))
                  tolist.append(self._format_line(1,flag,*todata))
              except TypeError:
                  # exceptions occur for lines where context separators go
                  fromlist.append(None)
                  tolist.append(None)
              flaglist.append(flag)
          return fromlist,tolist,flaglist
docs: Collects mdiff output into separate lists
  
          Before storing the mdiff from/to data into a list, it is converted
          into a single line of text with HTML markup.