<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph consisting of two cycles, one of length 3 (1->2->3->1) and one of length 2 (1->4->1), can you determine if the graph is aperiodic using NetworkX?
### Response:
import networkx as nx

# Create a directed graph
DG = nx.DiGraph([(1, 2), (2, 3), (3, 1), (1, 4), (4, 1)])

# Check if the directed graph is aperiodic
is_aper = nx.is_aperiodic(DG)

print('Graph is aperiodic:', is_aper)
<|EOT|>
