code: def delete(self, name, project_name):
      # check exists
  
      trigger = self.get_trigger_record(name, project_name)
      if trigger is None:
          raise Exception(f"Trigger doesn't exist: {name}")
  
      task = db.Tasks.query.filter(
          db.Tasks.object_type == self.OBJECT_TYPE,
          db.Tasks.object_id == trigger.id,
          db.Tasks.company_id == ctx.company_id,
      ).first()
  
      if task is not None:
          db.session.delete(task)
  
      db.session.delete(trigger)
  
      db.session.commit()
  
file_path: mindsdb/mindsdb/interfaces/triggers/triggers_controller.py
imports: from mindsdb_sql.parser.ast import Identifier
  from mindsdb_sql import parse_sql, ParsingException
  from mindsdb.interfaces.storage import db
  from mindsdb.interfaces.database.projects import ProjectController
  from mindsdb.utilities.context import context
  from mindsdb.api.executor.controllers.session_controller import SessionController
label_desc: Use image node_id 2 for calling the TriggersController obj's underlying member method code with example usage: obj.delete(name, project_name) without return types