code: def delete(self, p_todo, p_leave_tags=False):
          
          try:
              number = self._todos.index(p_todo)
  
              if p_todo.has_tag('id'):
                  for child in self.children(p_todo):
                      self.remove_dependency(p_todo, child, p_leave_tags)
  
              if p_todo.has_tag('p'):
                  for parent in self.parents(p_todo):
                      self.remove_dependency(parent, p_todo, p_leave_tags)
  
              del self._todos[number]
              self._update_todo_ids()
  
              self.dirty = True
          except ValueError:
              # todo item couldn't be found, ignore
              pass
docs: Deletes a todo item from the list.