def process_entertainment()

in gemini/agents/research-multi-agents/ev_agent/api_handler/api_01_NeighborhoodSummary.py [0:0]


    def process_entertainment(elements: List[Dict]) -> Entertainment:
        entertainment = Entertainment()
        for element in elements:
            tags = element.get("tags", {})

            amenity_type = tags.get("amenity")
            leisure_type = tags.get("leisure")

            if amenity_type == "cinema":
                entertainment.cinemas += 1
            elif amenity_type == "theatre":
                entertainment.theatres += 1
            elif amenity_type == "arts_centre":
                entertainment.arts_centres += 1
            elif amenity_type == "nightclub":
                entertainment.nightclubs += 1
            elif amenity_type == "community_centre":
                entertainment.community_centres += 1
            elif (
                tags.get("building") == "events_venue" or amenity_type == "events_venue"
            ):
                entertainment.event_venues += 1
            elif amenity_type == "museum":
                entertainment.museums += 1
            elif amenity_type == "gallery":
                entertainment.galleries += 1
        return entertainment