Also, could this whole thing just be `repository.__set__("metadata", {})`?