title: debugging pickle
body: <p>I'm trying to pickle quite an involved object hierarchy and getting the exception:</p>
  
  <pre><code>pickle.PicklingError: Can't pickle &lt;class 'function'&gt;: attribute lookup builtins.function failed
  </code></pre>
  
  <p>Are there any reasonable methods one can use to test the pickleablility of an object hierarchy? My aim would be to find the location of the offending function</p>