It is possible that context does have selected_sequences but it will be set to None. In this case getattr() will return None, breaking the intended logic.
It is possible that context does have selected_sequences but it will be set to None. In this case getattr() will return None, breaking the intended logic.