you can use double list comprehensions to flatten out nested structures:
clone_ids = list(set(clone_id for clone_list in clone_cursor for clone_id in clone_list['clone_ids']))

not necessary to change anything, just saying (and honestly, beyond 2 levels, they can get pretty unintuitive) :bomb: