code: from __future__ import annotations
  
  def      SCREAMING_SNAKE_CASE_  (		snake_case__							)  ->			list[int]:
  							lowerCAmelCase				=	[0] * len(snake_case__							)
  							for i in range(1     ,						len(snake_case__							)							):
  														lowerCAmelCase				=	duration_times[i - 1] + waiting_times[i - 1]
  							return waiting_times
  
  def      SCREAMING_SNAKE_CASE_  (		snake_case__     ,						snake_case__							)  ->			list[int]:
  							return [
  							    duration_time + waiting_times[i]
  							    for i, duration_time in enumerate(snake_case__							)
  							]
  
  def      SCREAMING_SNAKE_CASE_  (		snake_case__							)  ->			float:
  							return sum(snake_case__							) / len(snake_case__							)
  
  def      SCREAMING_SNAKE_CASE_  (		snake_case__							)  ->			float:
  							return sum(snake_case__							) / len(snake_case__							)
  
  
  if __name__ == "__main__":
  	# process id's
  	lowercase__    :       int						=			[1, 2, 3]
  
  	# ensure that we actually have processes
  	if len(processes) == 0:
  		print('''Zero amount of processes''')
  		raise SystemExit(0)
  
  	# duration time of all processes
  	lowercase__    :       Dict						=			[1_9, 8, 9]
  
  	# ensure we can match each id to a duration time
  	if len(duration_times) != len(processes):
  		print('''Unable to match all id\'s with their duration time''')
  		raise SystemExit(0)
  
  	# get the waiting times and the turnaround times
  	lowercase__    :       Optional[int]						=			calculate_waiting_times(duration_times)
  	lowercase__    :       Union[str, Any]						=			calculate_turnaround_times(duration_times, waiting_times)
  
  	# get the average times
  	lowercase__    :       Optional[int]						=			calculate_average_waiting_time(waiting_times)
  	lowercase__    :       List[Any]						=			calculate_average_turnaround_time(turnaround_times)
  
  	# print all the results
  	print('''Process ID\tDuration Time\tWaiting Time\tTurnaround Time''')
  	for i, process in enumerate(processes):
  		print(
  		    f'{process}\t\t{duration_times[i]}\t\t{waiting_times[i]}\t\t'
  		    f'{turnaround_times[i]}'
  		)
  	print(f'Average waiting time = {average_waiting_time}')
  	print(f'Average turn around time = {average_turnaround_time}')
  
  
  
  
style_context: from __future__ import annotations
  
  from enum import Enum
  
  
  
  
  class      lowercase_						(						UpperCamelCase_		):
  
  
  
  	"""simple docstring"""
  
  
  
  
  
  	UpperCAmelCase_						:      str     =       24
  	UpperCAmelCase_						:      Dict     =       21
  	UpperCAmelCase_						:      List[str]     =       18
  	UpperCAmelCase_						:      Optional[int]     =       15
  	UpperCAmelCase_						:      str     =       12
  	UpperCAmelCase_						:      Union[str, Any]     =       9
  	UpperCAmelCase_						:      List[Any]     =       6
  	UpperCAmelCase_						:      Any     =       3
  	UpperCAmelCase_						:      List[str]     =       2
  	UpperCAmelCase_						:      Any     =       1
  	UpperCAmelCase_						:      Any     =       -1
  	UpperCAmelCase_						:      Any     =       -2
  	UpperCAmelCase_						:      Optional[int]     =       -3
  	UpperCAmelCase_						:      List[Any]     =       -6
  	UpperCAmelCase_						:      Optional[int]     =       -9
  	UpperCAmelCase_						:      str     =       -12
  	UpperCAmelCase_						:      Union[str, Any]     =       -15
  	UpperCAmelCase_						:      List[str]     =       -18
  	UpperCAmelCase_						:      str     =       -21
  	UpperCAmelCase_						:      Dict     =       -24
  
  
  
  
  class      lowercase_						(						UpperCamelCase_		):
  
  
  
  	"""simple docstring"""
  
  
  
  
  
  	UpperCAmelCase_						:      List[str]     =       8
  	UpperCAmelCase_						:      Union[str, Any]     =       7
  	UpperCAmelCase_						:      int     =       6
  	UpperCAmelCase_						:      int     =       5
  	UpperCAmelCase_						:      Any     =       4
  	UpperCAmelCase_						:      Dict     =       3
  	UpperCAmelCase_						:      Tuple     =       2
  	UpperCAmelCase_						:      Any     =       1
  
  def      SCREAMING_SNAKE_CASE_  (		snake_case__     ,						snake_case__     ,						snake_case__     ,						)  ->			float:
  							if isinstance(snake_case__     ,						snake_case__							):
  														lowerCAmelCase				=	SIUnit[known_prefix.lower()]
  							if isinstance(snake_case__     ,						snake_case__							):
  														lowerCAmelCase				=	SIUnit[unknown_prefix.lower()]
  							lowerCAmelCase				=	known_amount * (
  							    1_0 ** (known_prefix.value - unknown_prefix.value)
  							)
  							return unknown_amount
  
  def      SCREAMING_SNAKE_CASE_  (		snake_case__     ,						snake_case__     ,						snake_case__     ,						)  ->			float:
  							if isinstance(snake_case__     ,						snake_case__							):
  														lowerCAmelCase				=	BinaryUnit[known_prefix.lower()]
  							if isinstance(snake_case__     ,						snake_case__							):
  														lowerCAmelCase				=	BinaryUnit[unknown_prefix.lower()]
  							lowerCAmelCase				=	known_amount * (
  							    2 ** ((known_prefix.value - unknown_prefix.value) * 1_0)
  							)
  							return unknown_amount
  
  
  if __name__ == "__main__":
  	import doctest
  
  	doctest.testmod()
  
  
  
  