For a function to be pickle-able, it has to be in the top-level of a real Python module. So, I made one for this code snippet. llvm-svn: 299738