code: def save_pickled_compatible(obj_to_pickle, file_name):
      """
      Save an object to the specified file in a backward compatible
      way for Pybind objects. See:
      http://pybind11.readthedocs.io/en/stable/advanced/classes.html#pickling-support
      and https://github.com/pybind/pybind11/issues/271
      """
      try:
          import cPickle as pickle  # Use cPickle on Python 2.7
      except ImportError:
          import pickle
      data = pickle.dumps(obj_to_pickle, 2)
      with open(file_name, "wb") as handle:
          handle.write(data)
  
imports: import pkgutil
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: save_pickled_compatible(obj_to_pickle, file_name) without return types