docs: def create_outputs(db, job_id, keysize, ds_size):
      """
      Build a correspondence between the outputs in the datastore and the
      ones in the database. Also, update the datastore size in the job table.
  
      :param db: a :class:`openquake.server.dbapi.Db` instance
      :param job_id: ID of the current job
      :param keysize: a list of pairs (key, size_mb)
      :param ds_size: total datastore size in MB
      """
      rows = [(job_id, DISPLAY_NAME.get(key, key), key, size)
              for key, size in keysize]
      db('UPDATE job SET size_mb=?x WHERE id=?x', ds_size, job_id)
      db.insert('output', 'oq_job_id display_name ds_key size_mb'.split(), rows)