+# python3.9 has a built-in removeprefix but AWS only has python3.8
+def remove_prefix(text, prefix):
+ if text.startswith(prefix):
+ return text[len(prefix):]
+ return text
+
+def hunt_rounds(turb, hunt_id):
+ """Returns array of strings giving rounds that exist in the given hunt"""
+
+ response = turb.table.query(
+ KeyConditionExpression=(
+ Key('hunt_id').eq(hunt_id) &
+ Key('SK').begins_with('round-')
+ )
+ )
+
+ if response['Count'] == 0:
+ return []
+
+ return [remove_prefix(option['SK'], 'round-')
+ for option in response['Items']]
+