class_docstr: Methods common to all wrapped data objects.
  
  Parameters
  ----------
  *args :
      Any extra args are passed as option to all wrapped data objects.
  
  **kwargs :
      Any extra keyword args are passed as option to all wrapped data objects.
docstr: Support pickle by serializing the VTK object data to something which can be pickled natively.
  
  The format of the serialized VTK object data depends on `pyvista.PICKLE_FORMAT` (case-insensitive).
  - If `pyvista.PICKLE_FORMAT == 'xml'`, the data is serialized as an XML-formatted string.
  - If `pyvista.PICKLE_FORMAT == 'legacy'`, the data is serialized to bytes in VTK's binary format.
code: def __getstate__(self):
      """Support pickle by serializing the VTK object data to something which can be pickled natively.
  
      The format of the serialized VTK object data depends on `pyvista.PICKLE_FORMAT` (case-insensitive).
      - If `pyvista.PICKLE_FORMAT == 'xml'`, the data is serialized as an XML-formatted string.
      - If `pyvista.PICKLE_FORMAT == 'legacy'`, the data is serialized to bytes in VTK's binary format.
      """
      state = self.__dict__.copy()
  
      if pyvista.PICKLE_FORMAT.lower() == "xml":
          # the generic VTK XML writer `vtkXMLDataSetWriter` currently has a bug where it does not pass all
          # settings down to the sub-writers. Until this is fixed, use the dataset-specific writers
          # https://gitlab.kitware.com/vtk/vtk/-/issues/18661
          writers = {
              _vtk.vtkImageData: _vtk.vtkXMLImageDataWriter,
              _vtk.vtkStructuredGrid: _vtk.vtkXMLStructuredGridWriter,
              _vtk.vtkRectilinearGrid: _vtk.vtkXMLRectilinearGridWriter,
              _vtk.vtkUnstructuredGrid: _vtk.vtkXMLUnstructuredGridWriter,
              _vtk.vtkPolyData: _vtk.vtkXMLPolyDataWriter,
              _vtk.vtkTable: _vtk.vtkXMLTableWriter,
          }
  
          for parent_type, writer_type in writers.items():
              if isinstance(self, parent_type):
                  writer = writer_type()
                  break
          else:
              raise TypeError(
                  f"Cannot pickle dataset of type {self.GetDataObjectType()}"
              )
  
          writer.SetInputDataObject(self)
          writer.SetWriteToOutputString(True)
          writer.SetDataModeToBinary()
          writer.SetCompressorTypeToNone()
          writer.Write()
          to_serialize = writer.GetOutputString()
  
      elif pyvista.PICKLE_FORMAT.lower() == "legacy":
          writer = _vtk.vtkDataSetWriter()
          writer.SetInputDataObject(self)
          writer.SetWriteToOutputString(True)
          writer.SetFileTypeToBinary()
          writer.Write()
          to_serialize = writer.GetOutputStdString()
  
      state["vtk_serialized"] = to_serialize
  
      # this needs to be here because in multiprocessing situations, `pyvista.PICKLE_FORMAT` is not shared between
      # processes
      state["PICKLE_FORMAT"] = pyvista.PICKLE_FORMAT
      return state
  
imports: from abc import abstractmethod
  import collections.abc
  from pathlib import Path
  from typing import Any, DefaultDict, Dict, Optional, Type, Union
  import numpy
  import pyvista
  from .None import _vtk_core
  from ._typing_core import NumpyArray
  from .datasetattributes import DataSetAttributes
  from .utilities.arrays import FieldAssociation
  from .utilities.fileio import read, set_vtkwriter_mode
  from .utilities.helpers import wrap
  from .utilities.misc import abstract_class
label_desc: Use image node_id 24 for calling the DataObject obj's underlying member method code with example usage: obj.__getstate__() and returns: state