code: def from_named_type(name, dtype):
      if not isinstance(dtype, tstruct):
          return PlacementTree(name, 1, 0, [])
      children = [
          PlacementTree.from_named_type(name, dtype)
          for name, dtype in dtype.items()
      ]
      width = sum(child.width for child in children)
      height = max([child.height for child in children], default=0) + 1
      return PlacementTree(name, width, height, children)
  
imports: from ..expr.types import tstruct
label_desc: Use image node_id 3 for calling the PlacementTree obj's underlying member method code with example usage: obj.from_named_type(name, dtype) and returns: PlacementTree, PlacementTree