class_docstr: Statistic tracking the count, mean, and (diagonal) variance of a single
  :class:`torch.Tensor`.
code: def update(self, sample: torch.Tensor) -> None:
      assert isinstance(sample, torch.Tensor)
      if self.shape is None:
          self.shape = sample.shape
      assert sample.shape == self.shape
      self.welford.update(sample.detach().reshape(-1))
  
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 CountMeanVarianceStats obj's underlying member method code with example usage: obj.update(sample) without return types