fn at_most_one_schema( schemas: impl Iterator<Item = SchemaId>, ) -> Result<Option<SchemaId>, (SchemaId, SchemaId)>