code: def ranges_depth(ranges, sizes, verbose=True):
      
      ranges.sort()
      for seqid, rrs in groupby(ranges, key=lambda x: x[0]):
          rrs = [(a, b) for (s, a, b) in rrs]
          size = sizes[seqid]
          ds, depthdetails = range_depth(rrs, size, verbose=verbose)
          depthdetails = [(seqid, s, e, d) for s, e, d in depthdetails]
          yield depthdetails
docs: Allow triple (seqid, start, end) rather than just tuple (start, end)