class_docstr: The basic interface of an iNNvestigate analyzer.
  
  This class defines the basic interface for analyzers:
  
  >>> model = create_keras_model()
  >>> a = Analyzer(model)
  >>> analysis = a.analyze(X_test)
  >>>
  >>> state = a.save()
  >>> a_new = A.load(*state)
  >>> analysis = a_new.analyze(X_test)
  
  :param model: A Keras model.
  :param disable_model_checks: Do not execute model checks that enforce
    compatibility of analyzer and model.
  :param neuron_selection_mode: How to select the neuron to analyze.
    Possible values are 'max_activation', 'index' for the neuron
    (expects indices at :func:`analyze` calls), 'all' take all neurons.
  
  .. note:: To develop a new analyzer derive from
    :class:`AnalyzerNetworkBase`.
code: def _state_to_kwargs(cls, state: dict) -> dict:
      disable_model_checks = state.pop("disable_model_checks")
      model_json = state.pop("model_json")
      model_weights = state.pop("model_weights")
      neuron_selection_mode = state.pop("neuron_selection_mode")
  
      # since `super()._state_to_kwargs(state)` should be called last
      # in every child class, the dict `state` should be empty at this point.
      if len(state) != 0:
          raise RuntimeError(
              f"Serialization failed. Got left-over state {state}."
          )
  
      model = kmodels.model_from_json(model_json)
      model.set_weights(model_weights)
      return {
          "model": model,
          "disable_model_checks": disable_model_checks,
          "neuron_selection_mode": neuron_selection_mode,
      }
  
imports: from __future__ import annotations
  import warnings
  from abc import ABCMeta, abstractmethod
  from typing import Any
  import numpy
  import tensorflow.keras.models
  import innvestigate.analyzer
  import innvestigate.backend.graph
  import innvestigate.utils.sequence
  from innvestigate.backend.types import LayerCheck, Model, ModelCheckDict, OptionalList
label_desc: Use image node_id 8 for calling the AnalyzerBase obj's underlying member method code with example usage: obj._state_to_kwargs(cls, state) and returns: dict