def select_authors_by_geo(query): """Pass exact name (case insensitive) of geography name, return ordered set of author ids. """ for geo, ids in AUTHOR_GEO.items(): if geo.casefold() == query.casefold(): return set(ids)
def get_geo_of_author(_id): """Pass author id and return the name of its associated epithet.""" for geo, ids in AUTHOR_GEO.items(): if _id in ids: return geo
def get_geographies(): """Return a list of all the epithet labels.""" return sorted(AUTHOR_GEO.keys())