def _SortChunksByFile(chunks):
 chunks_by_file = defaultdict(list)
 for chunk in chunks:
  filepath = chunk[u'range'][u'start'][u'filepath']
  chunks_by_file[filepath].append(chunk)
 return chunks_by_file

def _SortChunksByFile ( chunks ) : chunks_by_file = defaultdict ( list ) for chunk in chunks : filepath = chunk [ u'range' ] [ u'start' ] [ u'filepath' ] chunks_by_file [ filepath ] . append ( chunk ) return chunks_by_file
sort the members of the list |chunks| by their filepath .