(self, type, aux_data, children_defs)
| 238 | """ |
| 239 | |
| 240 | def __init__(self, type, aux_data, children_defs): |
| 241 | self.type = type |
| 242 | self.aux_data = aux_data |
| 243 | self.children_defs = children_defs |
| 244 | self.num_leaves = sum(ch.num_leaves for ch in children_defs) |
| 245 | |
| 246 | def unflatten(self, leaves): |
| 247 | r"""Given a list of values and a ``TreeDef``, builds a pytree. |