docstr: Helper method to build the summary as an `Explanation` object.
docstr_tok: ["Helper","method","to","build","the","summary","as","an","`","Explanation","`","object","."]
code: def _build_summary(self, protos: Dict[int, List[int]]) -> Explanation:
      """
      Helper method to build the summary as an `Explanation` object.
      """
      data = deepcopy(DEFAULT_DATA_PROTOSELECT)
      data["prototype_indices"] = np.concatenate(
          list(protos.values())
      ).astype(np.int32)
      data["prototype_labels"] = np.concatenate(
          [[self.label_inv_mapping[l]] * len(protos[l]) for l in protos]
      ).astype(
          np.int32
      )  # noqa: E741
      data["prototypes"] = self.Z[data["prototype_indices"]]
      return Explanation(meta=self.meta, data=data)
  
imports: import logging
  from copy import deepcopy
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import matplotlib.pyplot
  import numpy
  from matplotlib.offsetbox import AnnotationBbox, OffsetImage
  from skimage.transform import resize
  from sklearn.model_selection import KFold
  from sklearn.neighbors import KNeighborsClassifier
  from tqdm import tqdm
  from alibi.api.defaults import DEFAULT_DATA_PROTOSELECT, DEFAULT_META_PROTOSELECT
  from alibi.api.interfaces import Explanation, FitMixin, Summariser
  from alibi.utils.distance import batch_compute_kernel_matrix
  from alibi.utils.kernel import EuclideanDistance
label_desc: Use image node_id 4 for calling the ProtoSelect obj's underlying member method code with example usage: obj._build_summary(protos) and returns: Explanation