Program and test cases to detect if input python code is written in a purely functional programming format.