class_docstr: Tracks the average of a value.
class_docstr_tok: ["Tracks","the","average","of","a","value","."]
docstr: Reduces the tracked values.
code: def reduce(self, reduction="mean"):
      """Reduces the tracked values."""
      if reduction == "mean":
          return np.mean(self._values)
      elif reduction == "std":
          return np.std(self._values)
      elif reduction == "last":
          return self._values[-1]
      else:
          raise ValueError(f"Unknown reduction {reduction}")
  
imports: import collections
  from concurrent import futures
  import contextlib
  import functools
  import time
  from typing import List, Union
  import jax
  from jax import tree_util
  import jax.numpy
  import numpy
  from scipy import interpolate
  from scipy.spatial import transform
  import tqdm
label_desc: Use image node_id 4 for calling the ValueMeter obj's underlying member method code with example usage: obj.reduce(reduction) and returns: np, np, self