<｜begin▁of▁sentence｜>### Instruction:
Given a hierarchical structure where node 'A' is the root, 'B' and 'E' are children of 'A', 'C' and 'D' are children of 'B', and 'F' is a child of 'E', how can we reconstruct this hierarchy into a directed graph using the NetworkX 'tree_graph' API?
### Response:
from networkx.readwrite import json_graph
import networkx as nx

data = {
  'id': 'A',
  'children': [
    {
      'id': 'B',
      'children': [
        {'id': 'C'},
        {'id': 'D'}
      ]
    },
    {
      'id': 'E',
      'children': [
        {'id': 'F'}
      ]
    }
  ]
}

H = json_graph.tree_graph(data)
print('Nodes:', H.nodes())
print('Edges:', H.edges())
<|EOT|>
