class_docstr: Load data items from an input stream.
      
class_docstr_tok: ["Load","data","items","from","an","input","stream","."]
code: def __enter__(self):
      # confirm the serializer version
      serializer_version = pickle.load(self.in_stream)
      log.debug("serializer_version = %d", serializer_version)
      if serializer_version < self.serializer_min_version:
          raise ValueError(
              f"The file being loaded was saved with a serializer version of {serializer_version}, "
              + f"but the current deserializer in SHAP requires at least version {self.serializer_min_version}."
          )
      if serializer_version > self.serializer_max_version:
          raise ValueError(
              f"The file being loaded was saved with a serializer version of {serializer_version}, "
              + f"but the current deserializer in SHAP only support up to version {self.serializer_max_version}."
          )
  
      # confirm the block name
      block_name = pickle.load(self.in_stream)
      log.debug("block_name = %s", block_name)
      if block_name != self.block_name:
          raise ValueError(
              f"The next data block in the file being loaded was supposed to be {self.block_name}, "
              + f"but the next block found was {block_name}."
          )
  
      # confirm the block version
      block_version = pickle.load(self.in_stream)
      log.debug("block_version = %d", block_version)
      if block_version < self.block_min_version:
          raise ValueError(
              f"The file being loaded was saved with a block version of {block_version}, "
              + f"but the current deserializer in SHAP requires at least version {self.block_min_version}."
          )
      if block_version > self.block_max_version:
          raise ValueError(
              f"The file being loaded was saved with a block version of {block_version}, "
              + f"but the current deserializer in SHAP only support up to version {self.block_max_version}."
          )
      return self
  
file_path: shap/shap/_serializable.py
imports: import inspect
  import logging
  import pickle
  import cloudpickle
  import numpy
label_desc: Use image node_id 2 for calling the Deserializer obj's underlying member method code with example usage: obj.__enter__() and returns: self