docstr: Compute the agreement between a classifier prediction on an instance to be explained
  and the prediction on a set of samples which have a subset of perturbed superpixels.
  
  Parameters
  ----------
  samples
      Samples whose labels are to be compared with the instance label.
  
  Returns
  -------
  A boolean array indicating whether the prediction was the same as the instance label.
docstr_tok: ["Compute","the","agreement","between","a","classifier","prediction","on","an","instance","to","be","explained","and","the","prediction","on","a","set","of","samples","which","have","a","subset","of","perturbed","superpixels",".","Parameters","--","--","--","--","--","samples","Samples","whose","labels","are","to","be","compared","with","the","instance","label",".","Returns","--","--","--","-","A","boolean","array","indicating","whether","the","prediction","was","the","same","as","the","instance","label","."]
code: def compare_labels(self, samples: np.ndarray) -> np.ndarray:
      """
      Compute the agreement between a classifier prediction on an instance to be explained
      and the prediction on a set of samples which have a subset of perturbed superpixels.
  
      Parameters
      ----------
      samples
          Samples whose labels are to be compared with the instance label.
  
      Returns
      -------
      A boolean array indicating whether the prediction was the same as the instance label.
      """
  
      return self.predictor(samples) == self.instance_label
  
imports: import copy
  import logging
  from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
  import numpy
  from skimage.segmentation import felzenszwalb, quickshift, slic
  from alibi.api.defaults import DEFAULT_DATA_ANCHOR_IMG, DEFAULT_META_ANCHOR
  from alibi.api.interfaces import Explainer, Explanation
  from alibi.exceptions import PredictorCallError, PredictorReturnTypeError
  from alibi.utils.wrappers import ArgmaxTransformer
  from .anchor_base import AnchorBaseBeam
  from .anchor_explanation import AnchorExplanation
label_desc: Use image node_id 3 for calling the AnchorImageSampler obj's underlying member method code with example usage: obj.compare_labels(samples) and returns: unknown