<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

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()