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