herewe read numberswith and occurring most frequentlyand with sample standard deviation of the statistics themselves are held in named tuple called statisticsstatistics collections namedtuple("statistics""mean mode median std_dev"the main(function also serves as an overview of the program' structuredef main()if len(sys argv= or sys argv[ in {"- ""--help"}print("usage{ file [file filen]]formatsys argv[ ])sys exit(numbers [frequencies collections defaultdict(intfor filename in sys argv[ :]read_data(filenamenumbersfrequenciesif numbersstatistics calculate_statistics(numbersfrequenciesprint_results(len(numbers)statisticselseprint("no numbers found"we store all the numbers from all the files in the numbers list to calculate the mode ("most frequently occurring"numberswe need to know how many times each number occursso we create default dictionary using the int(factory functionto keep track of the counts we iterate over each filename and read in its data we pass the list and default dictionary as additional parameters so that the read_data(function can update them once we have read all the dataassuming some numbers were successfully readwe call calculate_statistics(this returns named tuple of type statistics which we then use to print the results def read_data(filenamenumbersfrequencies)for linoline in enumerate(open(filenameencoding="ascii")start= )for in line split()trynumber float(xnumbers append(numberfrequencies[number+ except valueerror as errprint("{filename}:{lino}skipping { }{err}format**locals())