class_docstr: Interface defining Metrics' API.
docstr: Implement this method if you need custom preprocessing of data
  or simply for creating/initialising additional attributes or assertions
  before a `data_batch` can be evaluated.
  
  Parameters
  ----------
  model:
      A model that is subject to explanation.
  x_batch:
      A np.ndarray which contains the input data that are explained.
  y_batch:
      A np.ndarray which contains the output labels that are explained.
  a_batch:
      A np.ndarray which contains pre-computed attributions i.e., explanations.
  kwargs:
      Optional, metric-specific parameters.
  
  Returns
  -------
  dict:
      Optional dictionary with additional kwargs, which will be passed to `self.evaluate_batch(...)`
docstr_tok: ["Implement","this","method","if","you","need","custom","preprocessing","of","data","or","simply","for","creating\/initialising","additional","attributes","or","assertions","before","a","`","data_batch","`","can","be","evaluated",".","Parameters","--","--","--","--","--","model",":","A","model","that","is","subject","to","explanation",".","x_batch",":","A","np.ndarray","which","contains","the","input","data","that","are","explained",".","y_batch",":","A","np.ndarray","which","contains","the","output","labels","that","are","explained",".","a_batch",":","A","np.ndarray","which","contains","pre-computed","attributions","i.e.",",","explanations",".","kwargs",":","Optional",",","metric-specific","parameters",".","Returns","--","--","--","-","dict",":","Optional","dictionary","with","additional","kwargs",",","which","will","be","passed","to","`","self.evaluate_batch","(","...",")","`"]
code: def custom_batch_preprocess(
      self,
      *,
      model: ModelInterface,
      x_batch: np.ndarray,
      y_batch: np.ndarray,
      a_batch: np.ndarray,
      **kwargs,
  ) -> Optional[Dict[str, Any]]:
      """
      Implement this method if you need custom preprocessing of data
      or simply for creating/initialising additional attributes or assertions
      before a `data_batch` can be evaluated.
  
      Parameters
      ----------
      model:
          A model that is subject to explanation.
      x_batch:
          A np.ndarray which contains the input data that are explained.
      y_batch:
          A np.ndarray which contains the output labels that are explained.
      a_batch:
          A np.ndarray which contains pre-computed attributions i.e., explanations.
      kwargs:
          Optional, metric-specific parameters.
  
      Returns
      -------
      dict:
          Optional dictionary with additional kwargs, which will be passed to `self.evaluate_batch(...)`
      """
      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 12 for calling the Metric obj's underlying member method code with example usage: obj.custom_batch_preprocess() without return types