docs: def _gen_from_dircmp(dc, lpath, rpath):
      """
      do the work of comparing the dircmp
      """
  
      left_only = dc.left_only
      left_only.sort()
  
      for f in left_only:
          fp = join(dc.left, f)
          if isdir(fp):
              for r, _ds, fs in walk(fp):
                  r = relpath(r, lpath)
                  for f in fs:
                      yield(LEFT, join(r, f))
          else:
              yield (LEFT, relpath(fp, lpath))
  
      right_only = dc.right_only
      right_only.sort()
  
      for f in right_only:
          fp = join(dc.right, f)
          if isdir(fp):
              for r, _ds, fs in walk(fp):
                  r = relpath(r, rpath)
                  for f in fs:
                      yield(RIGHT, join(r, f))
          else:
              yield (RIGHT, relpath(fp, rpath))
  
      diff_files = dc.diff_files
      diff_files.sort()
  
      for f in diff_files:
          yield (DIFF, join(relpath(dc.right, rpath), f))
  
      same_files = dc.same_files
      same_files.sort()
  
      for f in same_files:
          yield (BOTH, join(relpath(dc.left, lpath), f))
  
      subdirs = dc.subdirs.values()
      subdirs = sorted(subdirs)
      for sub in subdirs:
          for event in _gen_from_dircmp(sub, lpath, rpath):
              yield event