#!/usr/bin/env python3 import pybgpstream “””Code file for CS 6250…

Question Answered step-by-step #!/usr/bin/env python3 import pybgpstream “””Code file for CS 6250… #!/usr/bin/env python3import pybgpstream”””Code file for CS 6250 BGPM ProjectEdit this file according to the provided docstrings and assignment description. Do not change the existing function name or arguments.You may add additional functions but they need to be contained entirely in this file.”””def calculateShortestPath(cache_files): “””Compute the shortest AS path length for every origin AS from input BGP data files. Retrieves the shortest AS path length for every origin AS for every input file. Your code should return a dictionary where every key is the AS string and every value associated with the key is a list of the shortest path lengths for that AS. Note: For any AS that is not present in every input file, fill the corresponding entry in its list with a zero. Every value in the dictionary should have the same length. Args: cache_files: A list of files. Returns: A dictionary where every key is the AS and every value associated with the key is a list of the shortest path lengths for that AS, for every input file. For example: {“455”: [4, 2, 3], “533”: [4, 1, 2]} corresponds to the AS “455” with the shortest path lengths 4, 2 and 3 and the AS “533” with the shortest paths 4, 1 and 2. AS numbers should be strings. “”” return {}# The main function will not be run during grading.# You may use it however you like during testing.## NB: make sure that check_solution.py runs your# solution without errors prior to submissionif __name__ == ‘__main__’: # do nothing pass Image transcription textC56250 Computer Networks BGP Measurements ProjectCalculating AS-Path Length For each snapshot (e.g. Jan-2014)you will compute the shortest AS path length for … Show more… Show moreImage transcription textC. You can ignore all other corner cases. For eachsnapshot separately, put together all the shortestpath lengths for all origin AS that appe… Show more… Show more  Computer Science Engineering & Technology Python Programming CS 6250 Share QuestionEmailCopy link Comments (0)