<｜begin▁of▁sentence｜>### Instruction:
A data scientist is working with a graph representing correlations among financial stocks where edges correspond to the strength of the correlation between stocks. The scientist needs to ensure that the edge weights representing these correlations are all real numbers as a precondition for further statistical analysis. Can you use the `is_real_weighted` function from graspologic to validate that every edge in the network has a real number for its weight attribute?
### Response:
import networkx as nx
from graspologic.preconditions import is_real_weighted

# Create a graph with weighted edges
G = nx.Graph()
G.add_edge(1, 2, weight=0.5)
G.add_edge(2, 3, weight=3.14)
G.add_edge(3, 4, weight=-1.0)

# Check if the graph is real weighted
is_weighted = is_real_weighted(G, weight_attribute='weight')
print(f'Graph is real weighted: {is_weighted}')
<|EOT|>
