def METHOD_NAME(rules: [dict]) -> OpeningHours:
    opening_hours = OpeningHours()
    for day in rules:
        opening_hours.add_range(
            day=day["day"], open_time=day["open"], close_time=day["close"], time_format="%I:%M %p"
        )
    return opening_hours