code: def test_class():
      @interactive
      class C:
          a = 5
  
      bufs = serialize_object(dict(C=C))
      canned = pickle.loads(bufs[0])
      assert isinstance(canned["C"], CannedClass)
      d, r = deserialize_object(bufs)
      C2 = d["C"]
      assert C2.a == C.a
  
imports: import pickle
  from collections import namedtuple
  import pytest
  from ipyparallel import interactive
  from ipyparallel.serialize import deserialize_object, serialize_object
  from ipyparallel.serialize.canning import CannedArray, CannedClass
label_desc: Use image node_id 11 for calling a global function with example usage: test_class() without return types