class_docstr: Statistics of samples that are dictionaries with constant set of keys.
  
  For example the following are equivalent::
  
      # Version 1. Hand encode statistics.
      >>> a_stats = CountStats()
      >>> b_stats = CountMeanStats()
      >>> a_stats.update(torch.tensor(0.))
      >>> b_stats.update(torch.tensor([1., 2.]))
      >>> summary = {"a": a_stats.get(), "b": b_stats.get()}
  
      # Version 2. Collect samples into dictionaries.
      >>> stats = StatsOfDict({"a": CountStats, "b": CountMeanStats})
      >>> stats.update({"a": torch.tensor(0.), "b": torch.tensor([1., 2.])})
      >>> summary = stats.get()
      >>> summary
      {'a': {'count': 1}, 'b': {'count': 1, 'mean': tensor([1., 2.])}}
  
  :param default: Default type of statistics of values of the dictionary.
      Defaults to the inexpensive :class:`CountStats`.
  :param dict types: Dictionary mapping key to type of statistic that should
      be recorded for values corresponding to that key.
docstr: :returns: A dictionary of statistics. The keys of this dictionary are
      the same as the keys of the samples from which this object is
      updated.
  :rtype: dict
docstr_tok: [":","returns",":","A","dictionary","of","statistics",".","The","keys","of","this","dictionary","are","the","same","as","the","keys","of","the","samples","from","which","this","object","is","updated",".",":","rtype",":","dict"]
code: def get(self) -> Dict[Hashable, Any]:
      """
      :returns: A dictionary of statistics. The keys of this dictionary are
          the same as the keys of the samples from which this object is
          updated.
      :rtype: dict
      """
      return {k: v.get() for k, v in self.stats.items()}
  
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 4 for calling the StatsOfDict obj's underlying member method code with example usage: obj.get() and returns: unknown