<｜begin▁of▁sentence｜>### Instruction:
Given a directed or undirected graph which you can read from 'graph_components.gml',, how can you unfold it into a tree structure using a breadth-first search (BFS), while keeping a record of the vertices' correspondence between the original graph and the resulting tree graph?
### Response:
import igraph as ig

# Loading a graph from a GML file
g = ig.read('graph_components.gml')

# Use topological_sorting to find a suitable set of sources
sources = g.topological_sorting()

# Unfolding the graph into a tree
tree, mapping = g.unfold_tree(sources=sources[0], mode=ig.ALL)

# Formatting the mapping for display
formatted_mapping = {str(new): old for new, old in enumerate(mapping)}

# Outputting the results
print('Unfolded tree graph:', tree)
print('Vertex mapping:', formatted_mapping)
<|EOT|>
