get the name of the parent of the given node :param node_name: the name of the node :type node_name: string :rtype: string
(self, node_name)
| 333 | ) |
| 334 | |
| 335 | def parent_of(self, node_name): |
| 336 | """get the name of the parent of the given node |
| 337 | |
| 338 | :param node_name: the name of the node |
| 339 | :type node_name: string |
| 340 | :rtype: string |
| 341 | """ |
| 342 | return self[int(self.parent_indices[self.index(node_name)].item())] |
| 343 | |
| 344 | def index(self, node_name): |
| 345 | """get the index of the node |