class_docstr: Local Interpretable Model-agnostic Explanations (LIME).
class_docstr_tok: ["Local","Interpretable","Model-agnostic","Explanations","(","LIME",")","."]
code: def is_compatible(
      self, model: lit_model.Model, dataset: lit_dataset.Dataset
  ) -> bool:
      del dataset  # Unused as salience comes from the model
      text_keys = utils.spec_contains(
          model.input_spec(), types.TextSegment
      )
      pred_keys = utils.spec_contains(
          model.output_spec(), _SUPPORTED_PRED_TYPES
      )
      return text_keys and pred_keys
  
imports: from collections.abc import Iterable
  import functools
  from typing import Any, Optional
  from absl import logging
  from lit_nlp.api import components
  from lit_nlp.api import dataset
  from lit_nlp.api import dtypes
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.components.citrus import lime
  from lit_nlp.components.citrus import utils
  from lit_nlp.lib import utils
  import numpy
label_desc: Use image node_id 4 for calling the LIME obj's underlying member method code with example usage: obj.is_compatible(model, dataset) and returns: unknown