



'''simple docstring'''





def    _SCREAMING_SNAKE_CASE  (       UpperCamelCase			):



    """simple docstring"""





    lowerCAmelCase__ :  Optional[int]							      =					hex_num.strip()
    if not hex_num:
        raise ValueError("""No value was passed to the function"""			)

    lowerCAmelCase__ :  Optional[int]							      =					hex_num[0] == """-"""
    if is_negative:
        lowerCAmelCase__ :  Any							      =					hex_num[1:]

    try:
        lowerCAmelCase__ :  Optional[int]							      =					int(UpperCamelCase							,    16			)
    except ValueError:
        raise ValueError("""Invalid value was passed to the function"""			)

    lowerCAmelCase__ :  Optional[int]							      =					""""""
    while int_num > 0:
        lowerCAmelCase__ :  str							      =					str(int_num % 2			) + bin_str
        int_num >>= 1

    return int(("""-""" + bin_str) if is_negative else bin_str			)


if __name__ == "__main__":
 import doctest

 doctest.testmod()








def __UpperCamelCase			(       _A  ):
						if not numbers:
												return 0

						if not isinstance(_A ,  (list, tuple)  ) or not all(
						    isinstance(_A ,  _A  ) for number in numbers  ):
												raise ValueError('''numbers must be an iterable of integers'''  )

						lowerCAmelCase_      			=  lowerCAmelCase_      			=  lowerCAmelCase_      			=  numbers[0]

						for i in range(1 ,  len(_A  )  ):
												# update the maximum and minimum subarray products
												lowerCAmelCase_      			=  numbers[i]
												if number < 0:
																		lowerCAmelCase_			,					lowerCAmelCase_      			=  min_till_now, max_till_now
												lowerCAmelCase_      			=  max(_A ,  max_till_now * number  )
												lowerCAmelCase_      			=  min(_A ,  min_till_now * number  )

												# update the maximum product found till now
												lowerCAmelCase_      			=  max(_A ,  _A  )

						return max_prod




