class_docstr: SerDe Mixin for arbitrary class. Any class can implement `SerDe` if their fields to be saved can be dumped as pickle.
  
  Attributes:
      serialization_fields: ClassVar for indicating which fields to be saved.
  Examples:
      >>> class Foo(SerializationMixin):
              serialization_fields = ["foo"]
              def __init__(self):
                  self.foo = 'foo' # this field will be saved.
                  self.bar = 'bar' # but this is not because not listed in `serialization_fields`.
      >>> obj = Foo()
      >>> camphr.serde.to_disk(obj, "path/to/save")
class_docstr_tok: ["SerDe","Mixin","for","arbitrary","class",".","Any","class","can","implement","`","SerDe","`","if","their","fields","to","be","saved","can","be","dumped","as","pickle",".","Attributes",":","serialization_fields",":","ClassVar","for","indicating","which","fields","to","be","saved",".","Examples",":",">",">",">","class","Foo","(","SerializationMixin",")",":","serialization_fields","=","[","``","foo","''","]","def","__init__","(","self",")",":","self.foo","=","'foo","'","#","this","field","will","be","saved",".","self.bar","=","'bar","'","#","but","this","is","not","because","not","listed","in","`","serialization_fields","`",".",">",">",">","obj","=","Foo","(",")",">",">",">","camphr.serde.to_disk","(","obj",",","``","path\/to\/save","''",")"]
docstr: Load fields from pickle file, then create the instance.
docstr_tok: ["Load","fields","from","pickle","file",",","then","create","the","instance","."]
code: def to_disk(self, path: Path):
      """Load fields from pickle file, then create the instance."""
      path.mkdir(exist_ok=True)
      for k in self.serialization_fields:
          data = getattr(self, k)
          with (path / k).open("wb") as f:
              pickle.dump(data, f)
  
imports: from dataclasses import dataclass, asdict
  import importlib
  import dataclass_utils.error
  import pickle
  from pathlib import Path
  from typing import Any, ClassVar, List, Tuple, Type, TypeVar
  import dataclass_utils
  from typing_extensions import Protocol, runtime_checkable
  import json
label_desc: Use image node_id 2 for calling the SerializationMixin obj's underlying member method code with example usage: obj.to_disk(path) without return types