class_docstr: The abstract base class `BaseEstimator` defines the basic requirements of an estimator in ART. The BaseEstimator is
  is the highest abstraction of a machine learning model in ART.
class_docstr_tok: ["The","abstract","base","class","`","BaseEstimator","`","defines","the","basic","requirements","of","an","estimator","in","ART",".","The","BaseEstimator","is","is","the","highest","abstraction","of","a","machine","learning","model","in","ART","."]
docstr: Apply all postprocessing defences on model predictions.
  
  :param preds: model output to be post-processed.
  :type preds: Format as expected by the `model`
  :param fit: `True` if the defences are applied during training.
  :return: Post-processed model predictions.
code: def _apply_postprocessing(self, preds, fit: bool) -> np.ndarray:
      """
      Apply all postprocessing defences on model predictions.
  
      :param preds: model output to be post-processed.
      :type preds: Format as expected by the `model`
      :param fit: `True` if the defences are applied during training.
      :return: Post-processed model predictions.
      """
      post_preds = preds.copy()
      if self.postprocessing_defences is not None:
          for defence in self.postprocessing_defences:
              if fit:
                  if defence.apply_fit:
                      post_preds = defence(post_preds)
              else:
                  if defence.apply_predict:
                      post_preds = defence(post_preds)
  
      return post_preds
  
imports: from abc import ABC, abstractmethod
  from typing import Any, Dict, List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from tqdm.auto import trange
  from art.config import ART_NUMPY_DTYPE
label_desc: Use image node_id 16 for calling the BaseEstimator obj's underlying member method code with example usage: obj._apply_postprocessing(preds, fit) and returns: post_preds