How would you swap negative and positive elements together in an array?
Treat 0 as non-negative. Implement segregate_negatives_positives(nums), modify the array in place, and return it with all negative values before all non-negative values; the relative order within either group does not matter.
def segregate_negatives_positives(nums):