class_docstr: Used for AOTDispatch.
  This dataclass gives us the information we need to reconstruct a tensor subclass
  from our flat inputs.
  Why is this important? The graph that we'd like to trace out contains flat tensor inputs,
  But the user's original model may have subclass inputs and outputs.
  So we need to wrap/unwrap subclasses as necessary to translate between the user's
  view (subclass inps/outs), and the backend compiler's view (graph with no subclass args).
  
  Complications arise mostly from the fact that a subclass can hold more than one inner tensor;
  So for a given subclass input/output, we need to carefully track which indices map
  to the subclass tensor in the corresponding "dense-tensor-only" graph.
class_docstr_tok: ["Used","for","AOTDispatch",".","This","dataclass","gives","us","the","information","we","need","to","reconstruct","a","tensor","subclass","from","our","flat","inputs",".","Why","is","this","important","?","The","graph","that","we","'d","like","to","trace","out","contains","flat","tensor","inputs",",","But","the","user","'s","original","model","may","have","subclass","inputs","and","outputs",".","So","we","need","to","wrap\/unwrap","subclasses","as","necessary","to","translate","between","the","user's","view","(","subclass","inps\/outs",")",",","and","the","backend","compiler","'s","view","(","graph","with","no","subclass","args",")",".","Complications","arise","mostly","from","the","fact","that","a","subclass","can","hold","more","than","one","inner","tensor",";","So","for","a","given","subclass","input\/output",",","we","need","to","carefully","track","which","indices","map","to","the","subclass","tensor","in","the","corresponding","``","dense-tensor-only","''","graph","."]
code: def __post_init__(self):
      # sanity assert to make sure we don't leak memory
      assert is_fake(self.original_subclass)
  
imports: import collections
  from dataclasses import dataclass
  from enum import Enum
  from typing import Any, Callable, Dict, List, NewType, Optional, Set, Tuple, Union
  import torch
  import torch.utils._pytree
  from torch._guards import Source
  from torch._subclasses import FakeTensor
  from torch._subclasses.fake_tensor import is_fake
  from ..None import config
  from .utils import strict_zip
label_desc: Use image node_id 2 for calling the SubclassCreationMeta obj's underlying member method code with example usage: obj.__post_init__() without return types