Java Stream Sort Function In Python For Array