add python version of copy-list-with-random-pointer