Delete a specific resource

def delete(context, resource, id, **kwargs):
    """Delete a specific resource"""

    etag = kwargs.pop('etag', None)
    id = id
    subresource = kwargs.pop('subresource', None)
    subresource_id = kwargs.pop('subresource_id', None)

    uri = '%s/%s/%s' % (context.dci_cs_api, resource, id)
    if subresource:
        uri = '%s/%s/%s' % (uri, subresource, subresource_id)

    r = context.session.delete(uri, timeout=HTTP_TIMEOUT,
                               headers={'If-match': etag})
    return r