<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph where some nodes may form a cycle and others might extend from this cycle, can you use the 'is_semiconnected' function from NetworkX to determine if this graph is semiconnected? In this context, a graph is considered semiconnected if, for any two nodes, one is reachable from the other, or both are mutually reachable.
### Response:
import networkx as nx

G = nx.DiGraph()
G.add_edges_from([(1, 2), (2, 3), (3, 4), (4, 1)])  # Adding a cycle
G.add_edge(4, 5)  # Extending the cycle

# Use the is_semiconnected API to check if the graph is semiconnected
is_semi = nx.is_semiconnected(G)
print('The graph is semiconnected:' if is_semi else 'The graph is not semiconnected.')
<|EOT|>
