code: def delete(self, *, auto_commit=False):
          
          try:
              db.session.delete(self.resource)
              if auto_commit:
                  db.session.commit()
          except SQLAlchemyError:
              self.log.exception('Failed deleting resource: {}'.format(self.id))
              db.session.rollback()
docs: Removes a resource from the database
  
          Args:
              auto_commit (bool): Automatically commit the transaction. Default: `False`
  
          Returns:
              `None`