






def 		_UpperCamelCase      (			UpperCamelCase_				:    List[Any]						)     ->      tuple[int, int]:

						"""simple docstring"""



						if len(__UpperCamelCase						) == 1:
												return a[0], a[0]
						else:
												# split A into half.
												lowerCAmelCase__			  =  a[: len(__UpperCamelCase						) // 2]
												lowerCAmelCase__			  =  a[len(__UpperCamelCase						) // 2 :]

												# 2 sub problems, 1/2 of original size.
												lowerCAmelCase__  ,				lowerCAmelCase__			  =  max_difference(__UpperCamelCase						)
												lowerCAmelCase__  ,				lowerCAmelCase__			  =  max_difference(__UpperCamelCase						)

												# get min of first and max of second
												# linear time
												lowerCAmelCase__			  =  min(__UpperCamelCase						)
												lowerCAmelCase__			  =  max(__UpperCamelCase						)

												# 3 cases, either (small1, big1),
												# (min_first, max_second), (small2, big2)
												# constant comparisons
												if biga - smalla > max_second - min_first and biga - smalla > biga - smalla:
																		return smalla, biga
												elif biga - smalla > max_second - min_first:
																		return smalla, biga
												else:
																		return min_first, max_second


if __name__ == "__main__":
					import doctest

					doctest.testmod()











def 					SCREAMING_SNAKE_CASE							(   __UpperCamelCase)			->     list:
     a      =      []
     a      =      1

     for i in range(len(__UpperCamelCase)):
          if i + 1 < len(__UpperCamelCase) and text[i] == text[i + 1]:
               count += 1
          else:
               encoded.append((text[i], count))
               a      =      1

     return encoded

def 					SCREAMING_SNAKE_CASE							(   __UpperCamelCase)			->     str:
     return "".join(char * length for char, length in encoded)


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

   testmod(name="run_length_encode", verbose=True)
   testmod(name="run_length_decode", verbose=True)

