code: def test_roundtrip(cls_name):
      cls = getattr(m, cls_name)
      p = cls("test_value")
      p.setExtra1(15)
      p.setExtra2(48)
  
      data = pickle.dumps(p, 2)  # Must use pickle protocol >= 2
      p2 = pickle.loads(data)
      assert p2.value() == p.value()
      assert p2.extra1() == p.extra1()
      assert p2.extra2() == p.extra2()
  
file_path: coremltools/deps/pybind11/tests/test_pickling.py
imports: import pickle
  import re
  import pytest
  import env
  from pybind11_tests import pickling
label_desc: Use image node_id 2 for calling a global function with example usage: test_roundtrip(cls_name) without return types