<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(self, to_delete):
 """ Purge one or more items from the relevant caches """

        if not isinstance(to_delete, list):
            to_delete = [to_delete]
        for zenpy_object in to_delete:
            object_type = get_object_type(zenpy_object)
            object_cache = self.mapping.get(object_type, None)
            if object_cache:
                removed_object = object_cache.pop(zenpy_object.id, None)
                if removed_object:
                    log.debug("Cache RM: [%s %s]" % (object_type.capitalize(), zenpy_object.id))