class_docstr: Interface defining Metrics' API.
docstr: Implement this method if you need custom postprocessing of results or
  additional attributes.
  
  Parameters
  ----------
  model: torch.nn.Module, tf.keras.Model
      A torch or tensorflow model e.g., torchvision.models that is subject to explanation.
  x_batch: np.ndarray
      A np.ndarray which contains the input data that are explained.
  y_batch: np.ndarray
      A np.ndarray which contains the output labels that are explained.
  a_batch: np.ndarray, optional
      A np.ndarray which contains pre-computed attributions i.e., explanations.
  s_batch: np.ndarray, optional
      A np.ndarray which contains segmentation masks that matches the input.
  kwargs: any, optional
      Additional data which was created in custom_preprocess().
  
  Returns
  -------
  any:
      Can be implemented, optionally by the child class.
docstr_tok: ["Implement","this","method","if","you","need","custom","postprocessing","of","results","or","additional","attributes",".","Parameters","--","--","--","--","--","model",":","torch.nn.Module",",","tf.keras.Model","A","torch","or","tensorflow","model","e.g.",",","torchvision.models","that","is","subject","to","explanation",".","x_batch",":","np.ndarray","A","np.ndarray","which","contains","the","input","data","that","are","explained",".","y_batch",":","np.ndarray","A","np.ndarray","which","contains","the","output","labels","that","are","explained",".","a_batch",":","np.ndarray",",","optional","A","np.ndarray","which","contains","pre-computed","attributions","i.e.",",","explanations",".","s_batch",":","np.ndarray",",","optional","A","np.ndarray","which","contains","segmentation","masks","that","matches","the","input",".","kwargs",":","any",",","optional","Additional","data","which","was","created","in","custom_preprocess","(",")",".","Returns","--","--","--","-","any",":","Can","be","implemented",",","optionally","by","the","child","class","."]
code: def custom_postprocess(
      self,
      *,
      model: ModelInterface,
      x_batch: np.ndarray,
      y_batch: Optional[np.ndarray],
      a_batch: Optional[np.ndarray],
      s_batch: Optional[np.ndarray],
      **kwargs,
  ):
      """
      Implement this method if you need custom postprocessing of results or
      additional attributes.
  
      Parameters
      ----------
      model: torch.nn.Module, tf.keras.Model
          A torch or tensorflow model e.g., torchvision.models that is subject to explanation.
      x_batch: np.ndarray
          A np.ndarray which contains the input data that are explained.
      y_batch: np.ndarray
          A np.ndarray which contains the output labels that are explained.
      a_batch: np.ndarray, optional
          A np.ndarray which contains pre-computed attributions i.e., explanations.
      s_batch: np.ndarray, optional
          A np.ndarray which contains segmentation masks that matches the input.
      kwargs: any, optional
          Additional data which was created in custom_preprocess().
  
      Returns
      -------
      any:
          Can be implemented, optionally by the child class.
      """
      pass
  
imports: from __future__ import annotations
  import functools
  import logging
  import os
  import sys
  from abc import abstractmethod
  from typing import Any, Callable, ClassVar, Dict, Generator, Generic, Sequence, Set, TypeVar, Optional, Union, TYPE_CHECKING, no_type_check
  import matplotlib.pyplot
  import numpy
  from sklearn.utils import gen_batches
  from tqdm.auto import tqdm
  from quantus.helpers import asserts, utils, warn
  from quantus.functions.normalise_func import normalise_by_max
  from quantus.helpers.enums import DataType, EvaluationCategory, ModelType, ScoreDirection
  from quantus.helpers.model.model_interface import ModelInterface
label_desc: Use image node_id 6 for calling the Metric obj's underlying member method code with example usage: obj.custom_postprocess() without return types