@shared_task(name='nodeconductor.structure.remove_ssh_public_key')
def remove_ssh_public_key(key_data, service_project_link_str):
    public_key = deserialize_ssh_key(key_data)
    try:
        service_project_link = next(models.ServiceProjectLink.from_string(service_project_link_str))
    except __HOLE__:
        logger.warning('Missing service project link %s.', service_project_link_str)
        return True

    try:
        backend = service_project_link.get_backend()
        backend.remove_ssh_key(public_key, service_project_link)
        logger.info(
            'SSH key %s has been removed from service project link %s.',
            public_key.uuid, service_project_link_str)
    except ServiceBackendNotImplemented:
        pass
    except (ServiceBackendError, CloudBackendError):
        logger.warning(
            'Failed to remove SSH key %s from service project link %s.',
            public_key.uuid, service_project_link_str,
            exc_info=1)
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/structure/tasks.py/remove_ssh_public_key