<｜begin▁of▁sentence｜>### Instruction:
As an industrial hygienist, it's crucial to identify and assess workplace hazards and risks to ensure the health and safety of workers in industrial or occupational settings. Today, we have been tasked with assessing the safety of a network of interconnected machinery on a factory floor. The network is represented as a graph, with the following edges: (0,1), (1,2), and (2,3), each associated with weights of 1.0, 2.0, and 3.0, respectively. Our task is to verify if the graph is weighted, which will help us understand the potential risks associated with the connections between the machinery. To accomplish this, I will utilize the is_weighted function of the NetworkX library to determine the weighted status of the graph.
### Response:
from igraph import Graph

# Create a graph with weighted edges
g = Graph([(0, 1), (1, 2), (2, 3)])
g.es['weight'] = [1.0, 2.0, 3.0]

# Check if the graph is weighted
is_g_weighted = g.is_weighted()

# Print the result
print('Graph is weighted:', is_g_weighted)
<|EOT|>
