'''simple docstring'''




def 						__snake_case (       lowerCAmelCase       :     Tuple      ,  lowerCAmelCase       :     Optional[int]      ,  lowerCAmelCase       :     str			):







 if hue < 0 or hue > 360:
  raise Exception('hue should be between 0 and 360'			)

 if saturation < 0 or saturation > 1:
  raise Exception('saturation should be between 0 and 1'			)

 if value < 0 or value > 1:
  raise Exception('value should be between 0 and 1'			)

 __UpperCAmelCase         =					value * saturation
 __UpperCAmelCase         =					hue / 60
 __UpperCAmelCase         =					chroma * (1 - abs(hue_section % 2 - 1			))
 __UpperCAmelCase         =					value - chroma

 if hue_section >= 0 and hue_section <= 1:
  __UpperCAmelCase         =					round(255 * (chroma + match_value)			)
  __UpperCAmelCase         =					round(255 * (second_largest_component + match_value)			)
  __UpperCAmelCase         =					round(255 * (match_value)			)
 elif hue_section > 1 and hue_section <= 2:
  __UpperCAmelCase         =					round(255 * (second_largest_component + match_value)			)
  __UpperCAmelCase         =					round(255 * (chroma + match_value)			)
  __UpperCAmelCase         =					round(255 * (match_value)			)
 elif hue_section > 2 and hue_section <= 3:
  __UpperCAmelCase         =					round(255 * (match_value)			)
  __UpperCAmelCase         =					round(255 * (chroma + match_value)			)
  __UpperCAmelCase         =					round(255 * (second_largest_component + match_value)			)
 elif hue_section > 3 and hue_section <= 4:
  __UpperCAmelCase         =					round(255 * (match_value)			)
  __UpperCAmelCase         =					round(255 * (second_largest_component + match_value)			)
  __UpperCAmelCase         =					round(255 * (chroma + match_value)			)
 elif hue_section > 4 and hue_section <= 5:
  __UpperCAmelCase         =					round(255 * (second_largest_component + match_value)			)
  __UpperCAmelCase         =					round(255 * (match_value)			)
  __UpperCAmelCase         =					round(255 * (chroma + match_value)			)
 else:
  __UpperCAmelCase         =					round(255 * (chroma + match_value)			)
  __UpperCAmelCase         =					round(255 * (match_value)			)
  __UpperCAmelCase         =					round(255 * (second_largest_component + match_value)			)

 return [red, green, blue]



def 						__snake_case (       lowerCAmelCase       :     str      ,  lowerCAmelCase       :     Optional[int]      ,  lowerCAmelCase       :     Dict			):







 if red < 0 or red > 255:
  raise Exception('red should be between 0 and 255'			)

 if green < 0 or green > 255:
  raise Exception('green should be between 0 and 255'			)

 if blue < 0 or blue > 255:
  raise Exception('blue should be between 0 and 255'			)

 __UpperCAmelCase         =					red / 255
 __UpperCAmelCase         =					green / 255
 __UpperCAmelCase         =					blue / 255
 __UpperCAmelCase         =					max(lowerCAmelCase      ,  lowerCAmelCase      ,  lowerCAmelCase			)
 __UpperCAmelCase         =					value - min(lowerCAmelCase      ,  lowerCAmelCase      ,  lowerCAmelCase			)
 __UpperCAmelCase         =					0 if value == 0 else chroma / value

 if chroma == 0:
  __UpperCAmelCase         =					0.0
 elif value == float_red:
  __UpperCAmelCase         =					60 * (0 + (float_green - float_blue) / chroma)
 elif value == float_green:
  __UpperCAmelCase         =					60 * (2 + (float_blue - float_red) / chroma)
 else:
  __UpperCAmelCase         =					60 * (4 + (float_red - float_green) / chroma)

 __UpperCAmelCase         =					(hue + 360) % 360

 return [hue, saturation, value]



def 						__snake_case (       lowerCAmelCase       :     Optional[Any]      ,  lowerCAmelCase       :     str			):
 __UpperCAmelCase         =					abs(hsv_a[0] - hsv_a[0]			) < 0.2
 __UpperCAmelCase         =					abs(hsv_a[1] - hsv_a[1]			) < 0.0_02
 __UpperCAmelCase         =					abs(hsv_a[2] - hsv_a[2]			) < 0.0_02

 return check_hue and check_saturation and check_value




'''simple docstring'''




def 						__snake_case (       lowerCAmelCase       :     list			):

 for insert_index, insert_value in enumerate(collection[1:]			):
  __UpperCAmelCase         =					insert_index
  while insert_index >= 0 and insert_value < collection[insert_index]:
   __UpperCAmelCase         =					collection[insert_index]
   insert_index -= 1
  if insert_index != temp_index:
   __UpperCAmelCase         =					insert_value
 return collection


if __name__ == "__main__":
     from doctest import testmod

     testmod()

     _UpperCamelCase				:		List[Any]       			=		input('Enter numbers separated by a comma:\n').strip()
     _UpperCamelCase				:		List[Any]       			=		[int(item) for item in user_input.split(',')]
     print(f"{insertion_sort(unsorted) = }")



