<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(cls, resources, background=False):
 """ Delete this disk."""

        if not isinstance(resources, (list, tuple)):
            resources = [resources]

        resources = [cls.usable_id(item) for item in resources]

        opers = []
        for disk_id in resources:
            opers.extend(cls._detach(disk_id))

        if opers:
            cls.echo('Detaching your disk(s).')
            cls.display_progress(opers)

        opers = []
        for disk_id in resources:
            oper = cls.call('hosting.disk.delete', disk_id)
            opers.append(oper)

        if background:
            return opers

        cls.echo('Deleting your disk.')
        cls.display_progress(opers)

        return opers