<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edge set [(0, 1, 2), (1, 2, -5), (2, 3, 1), (3, 0, 1)], where the tuples represent (source, target, weight), does this graph contain a negative edge cycle?
### Response:
import networkx as nx

# Create a directed graph
G = nx.DiGraph()

# Add edges with weights
G.add_weighted_edges_from([(0, 1, 2), (1, 2, -5), (2, 3, 1), (3, 0, 1)])

# Check for the existence of a negative edge cycle
has_negative_cycle = nx.negative_edge_cycle(G, weight='weight')

print(f'Graph has a negative edge cycle: {has_negative_cycle}')
<|EOT|>
