docs: def view_task_hazard(token, dstore):
      """
      Display info about a given task. Here are a few examples of usage::
  
       $ oq show task_hazard:0  # the fastest task
       $ oq show task_hazard:-1  # the slowest task
      """
      tasks = set(dstore['task_info'])
      if 'source_data' not in dstore:
          return 'Missing source_data'
      if 'classical_split_filter' in tasks:
          data = dstore['task_info/classical_split_filter'].value
      else:
          data = dstore['task_info/compute_gmfs'].value
      data.sort(order='duration')
      rec = data[int(token.split(':')[1])]
      taskno = rec['taskno']
      arr = get_array(dstore['source_data'].value, taskno=taskno)
      st = [stats('nsites', arr['nsites']), stats('weight', arr['weight'])]
      sources = dstore['task_sources'][taskno - 1].split()
      srcs = set(decode(s).split(':', 1)[0] for s in sources)
      res = 'taskno=%d, weight=%d, duration=%d s, sources="%s"\n\n' % (
          taskno, rec['weight'], rec['duration'], ' '.join(sorted(srcs)))
      return res + rst_table(st, header='variable mean stddev min max n'.split())