<｜begin▁of▁sentence｜>### Instruction:
Imagine we are working on a project that requires us to analyze the structure of a complex network. Our colleagues in the data collection department have provided us with a dataset representing the network in question, formatted in GML (Graph Modeling Language). The filename containing this data is 'network_data.gml'. 

Our objective as engineers is to apply our technical skills to construct a digital representation of this network for further analysis. Could you enlighten us on how we might utilize the capabilities of NetworkX, a powerful Python library known for its proficiency in graph theory, to interpret the GML data from 'network_data.gml' and fabricate a graph object within our computational environment? Once this structure is established, we would like to catalog the constituents of the model by listing out all nodes and linkages (edges). Could you draft us a procedural outline on how one might proceed with such an endeavor?
### Response:
import networkx as nx

# GML graph data as a multi-line string
sample_gml_data = '''
graph [
  node [
    id 1
    label "Node1"
  ]
  node [
    id 2
    label "Node2"
  ]
  edge [
    source 1
    target 2
  ]
]'''
# Use NetworkX to parse the GML data
G = nx.parse_gml(sample_gml_data, label='label')

# Print nodes and edges of the graph
print('Nodes:', list(G.nodes(data=True)))
print('Edges:', list(G.edges(data=True)))
<|EOT|>
