<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edge set [(1, 2), (1, 3), (3, 1), (3, 2), (3, 5), (4, 5), (4, 6), (5, 4), (5, 6), (6, 4)], how would you use NetworkX to compute its directed modularity matrix?
### Response:
import networkx as nx

G = nx.DiGraph()
G.add_edges_from([(1, 2), (1, 3), (3, 1), (3, 2), (3, 5), (4, 5), (4, 6), (5, 4), (5, 6), (6, 4)])
B = nx.directed_modularity_matrix(G)
print(B)
<|EOT|>
