the 2-opt algorithm python code