<｜begin▁of▁sentence｜>### Instruction:
As an aircraft mechanic, you are tasked with inspecting and maintaining various aircraft components and systems to ensure their airworthiness and safety. Now, let's say you are given a specific aircraft to inspect, and the task involves systematically inspecting each component and keeping track of the order in which they are checked. How would you use the dfsiter function to perform a depth-first search and record the sequence in which the components are visited, ensuring a thorough and efficient inspection process?
### Response:
from igraph import Graph

# Assume you have a graph defined as such
edges = [(0, 1), (0, 2), (2, 3), (1, 3)]
g = Graph(edges)

# Create a DFS iterator
dfs_iterator = g.dfsiter(mode='ALL')

# Now you can use the iterator to traverse the graph
for vertex in dfs_iterator:
    print(vertex.index)
<|EOT|>
