code: def test_generator_closure():
      # this only creates a closure on Python 3
      @interactive
      def foo():
          i = "i"
          r = [i for j in (1, 2)]
          return r
  
      pfoo = dumps(foo)
      bar = loads(pfoo)
      assert foo() == bar()
  
file_path: ipyparallel/ipyparallel/tests/test_canning.py
imports: import os
  import pickle
  from binascii import b2a_hex
  from functools import partial
  from ipyparallel.serialize import canning
  from ipyparallel.serialize.canning import can, uncan
label_desc: Use image node_id 6 for calling a global function with example usage: test_generator_closure() and returns: r