class_docstr: Abstract class that defines a Heuristic.
  
  Args:
      shuffle_prop (float): shuffle proportion.
      reverse (bool): True if the most uncertain sample has the highest value.
      reduction (Union[str, Callable]): Reduction used after computing the score.
class_docstr_tok: ["Abstract","class","that","defines","a","Heuristic",".","Args",":","shuffle_prop","(","float",")",":","shuffle","proportion",".","reverse","(","bool",")",":","True","if","the","most","uncertain","sample","has","the","highest","value",".","reduction","(","Union","[","str",",","Callable","]",")",":","Reduction","used","after","computing","the","score","."]
code: def __init__(
      self, shuffle_prop=DEPRECATED, reverse=False, reduction="none"
  ):
      if shuffle_prop != DEPRECATED and shuffle_prop < 1.0:
          warnings.warn(
              SHUFFLE_PROP_DEPRECATION_NOTICE, DeprecationWarning
          )
      else:
          shuffle_prop = 0.0
      self.shuffle_prop = shuffle_prop
      self.reversed = reverse
      assert reduction in available_reductions or callable(reduction)
      self._reduction_name = reduction
      self.reduction = (
          reduction
          if callable(reduction)
          else available_reductions[reduction]
      )
  
imports: import types
  import warnings
  from collections.abc import Sequence
  from functools import wraps
  from typing import List
  import numpy
  import scipy.stats
  import torch
  from scipy.special import xlogy
  from torch import Tensor
  from baal.utils.array_utils import to_prob
label_desc: Use image node_id 1 to create a new AbstractHeuristic object  with example: obj = AbstractHeuristic(shuffle_prop, reverse, reduction)