<｜begin▁of▁sentence｜>### Instruction:
Given the Astrophysics collaborations Graph which can be read from a GML file named astro-ph.gml, how can you map node labels from strings to integers in order to use algorithms or functions that require numeric node IDs?
### Response:
import networkx as nx
from cdlib.utils import nx_node_integer_mapping

# Read the graph from a .gml file
G = nx.read_gml('astro-ph.gml')

# Apply the nx_node_integer_mapping function
G_mapped, mapping, rev_mapping = nx_node_integer_mapping(G)

# The G_mapped is now the graph with integer nodes,
# mapping contains the numeric_id to original_node_label mapping,
# and rev_mapping is the reverse of 'mapping'.
print(mapping)
<|EOT|>
