<｜begin▁of▁sentence｜>### Instruction:
As a computational biologist working with network analysis, imagine you have a dataset that represents a biological interaction network with two key molecules in a cellular pathway. Can you demonstrate how to use the add_edge function in the networkx API to connect the two molecules and assign a weight attribute of 5 to the interaction?
### Response:
from igraph import Graph

# Create an empty graph
g = Graph()

# Add vertices to the graph
g.add_vertices(2)

# Add an edge with an attribute
edge = g.add_edge(0, 1, weight=5)

# Print the edge tuple (source, target) and its attributes
print(edge.tuple, edge.attributes())
<|EOT|>
