class_docstr: Statistic tracking the count and mean of a single :class:`torch.Tensor`.
code: def update(self, sample: torch.Tensor) -> None:
      assert isinstance(sample, torch.Tensor)
      self.count += 1
      self.mean += (sample.detach() - self.mean) / self.count
  
imports: import copy
  from abc import ABC, abstractmethod
  from collections import defaultdict
  from typing import Any, Callable, Dict, Hashable, Union
  import torch
  from pyro.ops.welford import WelfordCovariance
label_desc: Use image node_id 2 for calling the CountMeanStats obj's underlying member method code with example usage: obj.update(sample) without return types