<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_identity(cls, sh_db, ident_id):
 """Delete an identity from SortingHat. :param sh_db: SortingHat database :param ident_id: identity identifier """

        success = False
        try:
            api.delete_identity(sh_db, ident_id)
            logger.debug("Identity %s deleted", ident_id)
            success = True
        except Exception as e:
            logger.debug("Identity not deleted due to %s", str(e))

        return success