Change get_parents function
Add tests for get_parents function