def group_by_video(list_results):
 result = defaultdict(list)
 for (video, subtitles) in list_results:
  result[video] += (subtitles or [])
 return result

def group_by_video ( list_results ) : result = defaultdict ( list ) for ( video , subtitles ) in list_results : result [ video ] += ( subtitles or [ ] ) return result
group the results of :class:listtasks <subliminal .