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