Python code for URL shortener using the Google PAI