input: Write a function to convert a positive integer to negative or vice versa using bitwise NOT operator. If the given integer is positive, convert it to negative, and if it is negative, convert it to positive. The function should handle both cases.
  
  def convert_number(x):
      if x >= 0:
          return ~x + 1
      else:
          return ~(x - 1)
  
  assert convert_number(5) == -5
  assert convert_number(-3) == 3
  assert convert_number(0) == 0
  assert convert_number(10) == -10
  assert convert_number(-10) == 10
output: def convert_number(x):
      if x >= 0:
          return ~x + 1
      else:
          return ~(x - 1)