Python code showing usage of upper function