class_docstr: Args:
      average (bool): a way to output one single value for metrics
                      that are calculated in several trials.
class_docstr_tok: ["Args",":","average","(","bool",")",":","a","way","to","output","one","single","value","for","metrics","that","are","calculated","in","several","trials","."]
code: def __init__(self, average=True, **kwargs):
      super().__init__(average=average)
  
imports: import dataclasses
  import math
  import warnings
  from collections import defaultdict
  import numpy
  import torch
  from sklearn.metrics import confusion_matrix, auc
  from baal.utils.array_utils import to_prob
label_desc: Use image node_id 1 to create a new Loss object from inherited base classes: Metrics with example: obj = Loss(average)