code: def __init__(self, x, shape):
      super().__init__()
      self.update(x)
  
imports: from __future__ import annotations
  import re
  from collections import namedtuple
  import lark
label_desc: Use image node_id 1 to create a new DictWithShape object from inherited base classes: dict with example: obj = DictWithShape(x, shape)