code: def _class_getstate(obj):
      clsdict = _extract_class_dict(obj)
      clsdict.pop("__weakref__", None)
  
      if issubclass(type(obj), abc.ABCMeta):
          # If obj is an instance of an ABCMeta subclass, dont pickle the
          # cache/negative caches populated during isinstance/issubclass
          # checks, but pickle the list of registered subclasses of obj.
          clsdict.pop("_abc_cache", None)
          clsdict.pop("_abc_negative_cache", None)
          clsdict.pop("_abc_negative_cache_version", None)
          registry = clsdict.pop("_abc_registry", None)
          if registry is None:
              # in Python3.7+, the abc caches and registered subclasses of a
              # class are bundled into the single _abc_impl attribute
              clsdict.pop("_abc_impl", None)
              (registry, _, _, _) = abc._get_dump(obj)
  
              clsdict["_abc_impl"] = [
                  subclass_weakref() for subclass_weakref in registry
              ]
          else:
              # In the above if clause, registry is a set of weakrefs -- in
              # this case, registry is a WeakSet
              clsdict["_abc_impl"] = [type_ for type_ in registry]
  
      if "__slots__" in clsdict:
          # pickle string length optimization: member descriptors of obj are
          # created automatically from obj's __slots__ attribute, no need to
          # save them in obj's state
          if isinstance(obj.__slots__, str):
              clsdict.pop(obj.__slots__)
          else:
              for k in obj.__slots__:
                  clsdict.pop(k, None)
  
      clsdict.pop("__dict__", None)  # unpicklable property object
  
      return (clsdict, {})
  
imports: import abc
  import copyreg
  import io
  import itertools
  import logging
  import sys
  import struct
  import types
  import weakref
  import typing
  from enum import Enum
  from collections import ChainMap
  from ._compat import pickle, Pickler
  from ._cloudpickle import _extract_code_globals, _BUILTIN_TYPE_NAMES, DEFAULT_PROTOCOL, _find_imported_submodules, _get_cell_contents, _is_importable, _builtin_type, _get_or_create_tracker_id, _make_skeleton_class, _make_skeleton_enum, _extract_class_dict, dynamic_subimport, subimport, _typevar_reduce, _get_bases, _make_cell, _make_empty_cell, CellType, _is_parametrized_type_hint, PYPY, cell_set, parametrized_type_hint_getinitargs, _create_parametrized_type_hint, builtin_code_type
label_desc: Use image node_id 5 for calling a global function with example usage: _class_getstate(obj) and returns: clsdict,  dict