docs: def list_outputs(db, job_id, full=True):
      """
      List the outputs for a given
      :class:`~openquake.server.db.models.OqJob`.
  
      :param db:
          a :class:`openquake.server.dbapi.Db` instance
      :param job_id:
          ID of a calculation.
      :param bool full:
          If True produce a full listing, otherwise a short version
      """
      outputs = get_outputs(db, job_id)
      out = []
      if len(outputs) > 0:
          truncated = False
          out.append('  id | name')
          outs = sorted(outputs, key=operator.attrgetter('display_name'))
          for i, o in enumerate(outs):
              if not full and i >= 10:
                  out.append(' ... | %d additional output(s)' % (len(outs) - 10))
                  truncated = True
                  break
              out.append('%4d | %s' % (o.id, o.display_name))
          if truncated:
              out.append('Some outputs where not shown. You can see the full '
                         'list with the command\n`oq engine --list-outputs`')
      return out