<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges [(0, 1), (1, 2), (2, 0)], can you use the is_dag function in networkx to check if the graph is a directed acyclic graph (DAG)?
### Response:
from networkx import DiGraph, is_directed_acyclic_graph

# Create a directed graph
dg = DiGraph([(0, 1), (1, 2), (2, 0)])

# Check if the graph is a DAG (Directed Acyclic Graph)
is_dag = is_directed_acyclic_graph(dg)

print(is_dag)
<|EOT|>
