

def       __lowerCAmelCase      (						A    ):
 return "".join([hex(a_    )[2:].zfill(2    ).upper() for byte in list(a_    )]    )



def       __lowerCAmelCase      (						A    ):






 if (len(a_    ) % 2) != 0:
  raise ValueError(
      "Base16 encoded data is invalid:\nData does not have an even number of hex digits."    )
 # Check the character set - the standard base16 alphabet
 # is uppercase according to RFC3548 section 6
 if not set(a_    ) <= set("0123456789ABCDEF"    ):
  raise ValueError(
      "Base16 encoded data is invalid:\nData is not uppercase hex or it contains invalid characters."    )
 # For every two hexadecimal digits (= a byte), turn it into an integer.
 # Then, string the result together into bytes, and return it.
 return bytes(int(data[i] + data[i + 1]       ,     16    ) for i in range(0       ,     len(a_    )       ,     2    )    )


if __name__ == "__main__":
    import doctest

    doctest.testmod()


from collections.abc import Sequence



def       __lowerCAmelCase      (						A       ,     A = False    ):
	if not arr:
		return 0

	UpperCAmelCase_       				=			0 if allow_empty_subarrays else float("-inf"    )
	UpperCAmelCase_       				=			0.0
	for num in arr:
		UpperCAmelCase_       				=			max(0 if allow_empty_subarrays else num       ,     curr_sum + num    )
		UpperCAmelCase_       				=			max(A       ,     A    )

	return max_sum


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

				testmod()

				_a:    Any 							=			[-2, 1, -3, 4, -1, 2, 1, -5, 4]
				print(F'{max_subarray_sum(nums) = }')