def get_exercise_prereqs(exercises):
 if exercises:
  exercises = get_content_items(ids=exercises)
 prereqs = []
 for exercise in exercises:
  prereqs += exercise.get('prerequisites', [])
 return list(set(prereqs))

def get_exercise_prereqs ( exercises ) : if exercises : exercises = get_content_items ( ids = exercises ) prereqs = [ ] for exercise in exercises : prereqs += exercise . get ( 'prerequisites' , [ ] ) return list ( set ( prereqs ) )
return a list of prequisites for each specified exercise .