-for plural, singular in category_singular.items():
- setattr(BookDetails, plural, _tags_getter(singular))
- setattr(BookDetails, singular, _tag_getter(singular))
+
+
+def add_tag_getters():
+ for plural, singular in category_singular.items():
+ setattr(BookDetails, plural, _tags_getter(singular))
+ setattr(BookDetails, singular, _tag_getter(singular))
+
+add_tag_getters()
+