class_docstr: Complementary trace event collected during the forward pass
  to trace the memory taken by activations
class_docstr_tok: ["Complementary","trace","event","collected","during","the","forward","pass","to","trace","the","memory","taken","by","activations"]
code: def to_dict(self):
      return {"memory_activations": self.memory_activations}
  
imports: from contextlib import contextmanager
  from dataclasses import dataclass
  from enum import auto, Enum
  from functools import lru_cache
  from typing import Dict, List, NamedTuple, Tuple, Union
  import numpy
  import torch
  import torch.nn
  from fairscale.nn import FullyShardedDataParallel
  from vissl.utils.visualize import matplotlib_figure_to_image
label_desc: Use image node_id 1 for calling the TraceBackwardEvent obj's underlying member method code with example usage: obj.to_dict() and returns: dict