<｜begin▁of▁sentence｜>### Instruction:
Given the Political blogs dataset in a GML file named 'polblogs.gml' where node labels are strings, how can we map the node labels from strings to integers while maintaining a reference to their original labels?
### Response:
import networkx as nx
from cdlib.utils import convert_graph_formats

# Load a graph from a GML file where node labels are strings
G = nx.read_gml('polblogs.gml')

# Convert the graph node labels from strings to integers
G_integer, mapping, _ = convert_graph_formats.nx_node_integer_mapping(G)

# Output the mapping to see the changes
print(mapping)
<|EOT|>
