def add(self, resource, replace=False):
        """Add just a single resource."""
        uri = resource.uri
        if (uri in self and not replace):
            raise ResourceListDupeError(
                "Attempt to add resource already in resource_list")
        self[uri] = resource
Add just a single resource.