def METHOD_NAME(self, categories):
    keywords = []
    for category in categories:
        origin_id = category["id"]
        name = category["name"]
        keyword = self.upsert_keyword(origin_id, name)
        keywords.append(keyword)
    return keywords