code: def __init__(
      self,
      model,
      masker,
      sort_order,
      perturbation,
      linearize_link=False,
  ):
      # self.f = lambda masked, x, index: model.predict(masked)
      self.model = model if callable(model) else model.predict
      self.masker = masker
      self.sort_order = sort_order
      self.perturbation = perturbation
      self.linearize_link = linearize_link
  
      # define our sort order
      if self.sort_order == "positive":
          self.sort_order_map = lambda x: np.argsort(-x)
      elif self.sort_order == "negative":
          self.sort_order_map = lambda x: np.argsort(x)
      elif self.sort_order == "absolute":
          self.sort_order_map = lambda x: np.argsort(-abs(x))
      else:
          raise ValueError(
              'sort_order must be either "positive", "negative", or "absolute"!'
          )
  
      # user must give valid masker
      underlying_masker = (
          masker.masker
          if isinstance(masker, FixedComposite)
          else masker
      )
      if isinstance(underlying_masker, Text):
          self.data_type = "text"
      elif isinstance(underlying_masker, Image):
          self.data_type = "image"
      else:
          self.data_type = "tabular"
          # raise ValueError("masker must be for \"tabular\", \"text\", or \"image\"!")
  
      self.score_values = []
      self.score_aucs = []
      self.labels = []
  
file_path: shap/shap/benchmark/_sequential.py
imports: import time
  import matplotlib.pyplot
  import numpy
  import pandas
  import sklearn
  from tqdm.auto import tqdm
  from shap import Explanation, links
  from shap.maskers import FixedComposite, Image, Text
  from shap.utils import MaskedModel
  from ._result import BenchmarkResult
label_desc: Use image node_id 1 to create a new SequentialPerturbation object  with example: obj = SequentialPerturbation(model, masker, sort_order, perturbation, linearize_link)