<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_identity(self, identity):
 """ Delete an identity from its name or id :param: a zobjects.Identity object with name or id defined or a string of the identity's name """

        if isinstance(identity, zobjects.Identity):
            self.request(
                'DeleteIdentity', {'identity': identity.to_selector()})
        else:
            self.request('DeleteIdentity', {'identity': {'name': identity}})