code: 
  '''simple docstring'''
  
  
  
  from __future__ import annotations
  
  from statistics import mean
  
  
  
  
  
  def  _A		(							lowercase__	):
  						lowercase__							 =       2
  						lowercase__							 =       list(_UpperCAmelCase	)
  						lowercase__							 =       [0] * len(_UpperCAmelCase	)
  						lowercase__							 =       0
  						while True:
  												lowercase__							 =       True
  												for i, burst_time in enumerate(_UpperCAmelCase	):
  																		if rem_burst_times[i] > 0:
  																								lowercase__							 =       False
  																								if rem_burst_times[i] > quantum:
  																														t += quantum
  																														rem_burst_times[i] -= quantum
  																								else:
  																														t += rem_burst_times[i]
  																														lowercase__							 =       t - burst_time
  																														lowercase__							 =       0
  												if done is True:
  																		return waiting_times
  
  
  
  
  
  def  _A		(							lowercase__		,		lowercase__	):
  						return [burst + waiting for burst, waiting in zip(_UpperCAmelCase		,		_UpperCAmelCase	)]
  
  
  if __name__ == "__main__":
  				__A          =    [3, 5, 7]
  				__A          =    calculate_waiting_times(burst_times)
  				__A          =    calculate_turn_around_times(burst_times, waiting_times)
  				print("Process ID \tBurst Time \tWaiting Time \tTurnaround Time")
  				for i, burst_time in enumerate(burst_times):
  								print(
  								    F'''  {i + 1}\t\t  {burst_time}\t\t  {waiting_times[i]}\t\t  '''
  								    F'''{turn_around_times[i]}'''
  								)
  				print(F'''\nAverage waiting time = {mean(waiting_times):.5f}''')
  				print(F'''Average turn around time = {mean(turn_around_times):.5f}''')
style_context: 
  '''simple docstring'''
  
  
  
  def  _A		(							lowercase__	):
  
  						# validate:
  						if not isinstance(lowercase__		,		lowercase__	) or not all(
  						    isinstance(lowercase__		,		lowercase__	) and item >= 0 for item in citations	):
  												raise ValueError("""The citations should be a list of non negative integers."""	)
  
  						citations.sort()
  						lowercase__							 =       len(lowercase__	)
  
  						for i in range(lowercase__	):
  												if citations[len_citations - 1 - i] <= i:
  																		return i
  
  						return len_citations
  
  
  if __name__ == "__main__":
  				import doctest
  
  				doctest.testmod()
  
  
  
  
  
  
  