


'''simple docstring'''







def    lowerCAmelCase__ (       lowerCamelCase  :    Any     ):
       return -num if num < 0 else num






def    lowerCAmelCase__ (       lowerCamelCase  :    Tuple     ):







       if len(lowerCamelCase     ) == 0:
              raise ValueError('abs_min() arg is an empty sequence'     )
       _A  :			str											=      x[0]
       for i in x:
              if abs_val(lowerCamelCase     ) < abs_val(lowerCamelCase     ):
                     _A  :			Tuple											=      i
       return j






def    lowerCAmelCase__ (       lowerCamelCase  :    List[Any]     ):







       if len(lowerCamelCase     ) == 0:
              raise ValueError('abs_max() arg is an empty sequence'     )
       _A  :			List[Any]											=      x[0]
       for i in x:
              if abs(lowerCamelCase     ) > abs(lowerCamelCase     ):
                     _A  :			Dict											=      i
       return j






def    lowerCAmelCase__ (       lowerCamelCase  :    List[str]     ):







       if len(lowerCamelCase     ) == 0:
              raise ValueError('abs_max_sort() arg is an empty sequence'     )
       return sorted(lowerCamelCase						,key=lowerCamelCase     )[-1]






def    lowerCAmelCase__ (       ):
       assert abs_val(0     ) == 0
       assert abs_val(34     ) == 34
       assert abs_val(-100000000000     ) == 100000000000

       _A  :			Tuple											=      [-3, -1, 2, -11]
       assert abs_max(lowerCamelCase     ) == -11
       assert abs_max_sort(lowerCamelCase     ) == -11
       assert abs_min(lowerCamelCase     ) == -1


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   test_abs_val()
   print(abs_val(-34))  # --> 34










'''simple docstring'''







A   :  Optional[Any]       		=				{
    '''0000''': '''0''',
    '''0001''': '''1''',
    '''0010''': '''2''',
    '''0011''': '''3''',
    '''0100''': '''4''',
    '''0101''': '''5''',
    '''0110''': '''6''',
    '''0111''': '''7''',
    '''1000''': '''8''',
    '''1001''': '''9''',
    '''1010''': '''a''',
    '''1011''': '''b''',
    '''1100''': '''c''',
    '''1101''': '''d''',
    '''1110''': '''e''',
    '''1111''': '''f''',
}






def    lowerCAmelCase__ (       lowerCamelCase  :    str     ):
       _A  :			Union[str, Any]											=      str(lowerCamelCase     ).strip()

       # Exceptions
       if not binary_str:
              raise ValueError('Empty string was passed to the function'     )
       _A  :			Any											=      binary_str[0] == '-'
       _A  :			str											=      binary_str[1:] if is_negative else binary_str
       if not all(char in '01' for char in binary_str     ):
              raise ValueError('Non-binary value was passed to the function'     )

       _A  :			Optional[Any]											=      (
           '0' * (4 * (divmod(len(lowerCamelCase     )						,4     )[0] + 1) - len(lowerCamelCase     )) + binary_str
       )

       _A  :			Optional[int]											=      []
       for x in range(0						,len(lowerCamelCase     )						,4     ):
              hexadecimal.append(BITS_TO_HEX[binary_str[x : x + 4]]     )
       _A  :			int											=      '0x' + ''.join(lowerCamelCase     )

       return "-" + hexadecimal_str if is_negative else hexadecimal_str


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

   testmod()






