<｜begin▁of▁sentence｜>### Instruction:
As a Wine Sommelier, imagine you are tasked with organizing a wine tasting event where each wine bottle is assigned a unique code for identification purposes. How would you convert the wine bottle labels from names to numerical codes while keeping a record of the original names linked to their respective numerical codes for future reference and inventory management?
### Response:
import networkx as nx
from cdlib.utils import nx_node_integer_mapping

# Read the coauthorships in network science graph
G = nx.read_gml('netscience.gml')

# Convert node labels from strings to integers
G_int, label_mapping, _ = nx_node_integer_mapping(G)

print(label_mapping)
<|EOT|>
