python reference code