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