<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges (0, 1), (1, 2), (2, 3), how can you use networkx to compute the dyad census and then print it in string format?
### Response:
import networkx as nx

# Create a directed graph
g = nx.DiGraph()
g.add_edges_from([(0, 1), (1, 2), (2, 3)])

# Compute dyad census
from networkx.algorithms.structuralholes import dyad_census
dyads = dyad_census(g)

# Print the dyad census in string format
print(str(dyads))
<|EOT|>
