class_docstr: Serializable will change the behaviors of pickle.
  
      The rule to tell if a attribute will be kept or dropped when dumping.
      The rule with higher priorities is on the top
      - in the config attribute list -> always dropped
      - in the include attribute list -> always kept
      - in the exclude attribute list -> always dropped
      - name not starts with `_` -> kept
      - name starts with `_` -> kept if `dump_all` is true else dropped
  
  It provides a syntactic sugar for distinguish the attributes which user doesn't want.
  - For examples, a learnable Datahandler just wants to save the parameters without data when dumping to disk
class_docstr_tok: ["Serializable","will","change","the","behaviors","of","pickle",".","The","rule","to","tell","if","a","attribute","will","be","kept","or","dropped","when","dumping",".","The","rule","with","higher","priorities","is","on","the","top","-","in","the","config","attribute","list","-",">","always","dropped","-","in","the","include","attribute","list","-",">","always","kept","-","in","the","exclude","attribute","list","-",">","always","dropped","-","name","not","starts","with","`","_","`","-",">","kept","-","name","starts","with","`","_","`","-",">","kept","if","`","dump_all","`","is","true","else","dropped","It","provides","a","syntactic","sugar","for","distinguish","the","attributes","which","user","does","n't","want",".","-","For","examples",",","a","learnable","Datahandler","just","wants","to","save","the","parameters","without","data","when","dumping","to","disk"]
docstr: Return the real backend of a Serializable class. The pickle_backend value can be "pickle" or "dill".
  
  Returns:
      module: pickle or dill module based on pickle_backend
docstr_tok: ["Return","the","real","backend","of","a","Serializable","class",".","The","pickle_backend","value","can","be","``","pickle","''","or","``","dill","''",".","Returns",":","module",":","pickle","or","dill","module","based","on","pickle_backend"]
code: def get_backend(cls):
      """
      Return the real backend of a Serializable class. The pickle_backend value can be "pickle" or "dill".
  
      Returns:
          module: pickle or dill module based on pickle_backend
      """
      # NOTE: pickle interface like backend; such as dill
      if cls.pickle_backend == "pickle":
          return pickle
      elif cls.pickle_backend == "dill":
          return dill
      else:
          raise ValueError(
              "Unknown pickle backend, please use 'pickle' or 'dill'."
          )
  
file_path: qlib/qlib/utils/serial.py
imports: import pickle
  import dill
  from pathlib import Path
  from typing import Union
  from ..config import C
label_desc: Use image node_id 10 for calling the Serializable obj's underlying member method code with example usage: obj.get_backend(cls) and returns: pickle, dill