<｜begin▁of▁sentence｜>### Instruction:
Imagine you're navigating a sophisticated irrigation system designed for optimal water flow throughout the farmland. This system can be represented by a set of directed pathways: water flows from the source at point 0 to point 1 and 2, from 1 to 2, from 2 to 3, and from 3 back to the source at 0, reflecting the edges (0, 1), (0, 2), (1, 2), (2, 3), (3, 0). Your goal as an Agricultural Engineer is to troubleshoot and optimize the water circuit.

Firstly, you're interested in pinpointing any loops that might cause water to circle back inefficiently, following the directed paths just as water would. If no such loops exist, it would mean a redesign is in order since the water isn't cycling as intended.

Secondly, disregarding the direction of water flow, you turn your attention to identifying any possible loop or cycle scenarios within this irrigation network that might exist even if the water could flow freely in any direction along the pathways.

In both cases, your task involves the same network of pathways, yet the criteria for identifying a loop varies. The first scenario strictly adheres to the intended direction of flow, while the second scenario allows for a more abstract consideration of connectivity. Your expertise will determine how best to manage and modify these pathways to ensure a closed-circuit of water flow through the field, either adhering to or ignoring the flow direction, as the situation dictates.
### Response:
import networkx as nx

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

try:
    # Try to find a cycle in the graph
    cycle = nx.find_cycle(G, orientation='original')
    print('Directed cycle found:', cycle)
except nx.NetworkXNoCycle:
    print('No directed cycle found.')

# Now find an undirected cycle (ignoring the orientation of the edges)
cycle = list(nx.find_cycle(G, orientation='ignore'))
print('Undirected cycle found:', cycle)
<|EOT|>
