Graph Theory.
extract source and target IP addresses, which are added as nodes, and a connection between them is represented as an edge. The graph layout is determined using the spring layout algorithm, arranging the nodes based on their connections # Initialize a network graph G = nx.Graph() for line in output: