code: def delete_record(self, record):
          
          try:
              self.session.delete(record)
              self.session.commit()
          except Exception as e:
              self.session.rollback()
              raise ProgrammingError(e)
          finally:
              self.session.close()
docs: Permanently removes record from table.