class_docstr: This is the superclass of all serializable objects.
      
class_docstr_tok: ["This","is","the","superclass","of","all","serializable","objects","."]
docstr: This is meant to be overridden by subclasses and called with super.
  
  We return constructor argument values (we have no values to load in this abstract class).
docstr_tok: ["This","is","meant","to","be","overridden","by","subclasses","and","called","with","super",".","We","return","constructor","argument","values","(","we","have","no","values","to","load","in","this","abstract","class",")","."]
code: def _instantiated_load(cls, in_file, **kwargs):
      """This is meant to be overridden by subclasses and called with super.
  
      We return constructor argument values (we have no values to load in this abstract class).
      """
      obj_type = pickle.load(in_file)
      if obj_type is None:
          return None
  
      if not inspect.isclass(obj_type) or (
          not issubclass(obj_type, cls) and (obj_type is not cls)
      ):
          raise Exception(
              f"Invalid object type loaded from file. {obj_type} is not a subclass of {cls}."
          )
  
      # here we call the constructor with all the arguments we have loaded
      constructor_args = obj_type.load(
          in_file, instantiate=False, **kwargs
      )
      used_args = inspect.getfullargspec(obj_type.__init__)[0]
      return obj_type(
          **{
              k: constructor_args[k]
              for k in constructor_args
              if k in used_args
          }
      )
  
file_path: shap/shap/_serializable.py
imports: import inspect
  import logging
  import pickle
  import cloudpickle
  import numpy
label_desc: Use image node_id 3 for calling the Serializable obj's underlying member method code with example usage: obj._instantiated_load(cls, in_file) and returns: obj_type, None