docs: def collect_compare_into(left, right, added, removed, altered, same):
      """
      collect the results of compare into the given lists (or None if
      you do not wish to collect results of that type. Returns a tuple
      of (added, removed, altered, same)
      """
  
      for event, filename in compare(left, right):
          if event == LEFT:
              group = removed
  
          elif event == RIGHT:
              group = added
  
          elif event == DIFF:
              group = altered
  
          elif event == BOTH:
              group = same
  
          else:
              assert False
  
          if group is not None:
              group.append(filename)
  
      return added, removed, altered, same