Change segment name in python