code: def _delete_iapp(self, iapp_name, deploying_device):
          '''Delete an iapp service and template on the root device.
  
          :param iapp_name: str -- name of iapp
          :param deploying_device: ManagementRoot object -- device where the
                                   iapp will be deleted
          '''
  
          iapp = deploying_device.tm.sys.application
          iapp_serv = iapp.services.service.load(
              name=iapp_name, partition=self.partition
          )
          iapp_serv.delete()
          iapp_tmpl = iapp.templates.template.load(
              name=iapp_name, partition=self.partition
          )
          iapp_tmpl.delete(f _delete_iapp(self, iapp_name, deploying_device):
          '''Delete an iapp service and template on the root device.
  
          :param iapp_name: str -- name of iapp
          :param deploying_device: ManagementRoot object -- device where the
                                   iapp will be deleted
          '''
  
          iapp = deploying_device.tm.sys.application
          iapp_serv = iapp.services.service.load(
              name=iapp_name, partition=self.partition
          )
          iapp_serv.delete()
          iapp_tmpl = iapp.templates.template.load(
              name=iapp_name, partition=self.partition
          )
          iapp_tmpl.delete()
docs: Delete an iapp service and template on the root device.
  
          :param iapp_name: str -- name of iapp
          :param deploying_device: ManagementRoot object -- device where the
                                   iapp will be deleted