docs: def delete(self, force=False):
          """Delete a record.
  
          If `force` is ``False``, the record is soft-deleted: record data will
          be deleted but the record identifier and the history of the record will
          be kept. This ensures that the same record identifier cannot be used
          twice, and that you can still retrieve its history. If `force` is
          ``True``, then the record is completely deleted from the database.
  
          #. Send a signal :data:`invenio_records.signals.before_record_delete`
             with the current record as parameter.
  
          #. Delete or soft-delete the current record.
  
          #. Send a signal :data:`invenio_records.signals.after_record_delete`
             with the current deleted record as parameter.
  
          :param force: if ``True``, completely deletes the current record from
                 the database, otherwise soft-deletes it.
          :returns: The deleted :class:`Record` instance.
          """
          if self.model is None:
              raise MissingModelError()
  
          with db.session.begin_nested():
              before_record_delete.send(
                  current_app._get_current_object(),
                  record=self
              )
  
              if force:
                  db.session.delete(self.model)
              else:
                  self.model.json = None
                  db.session.merge(self.model)
  
          after_record_delete.send(
              current_app._get_current_object(),
              record=self
          )
          return self