input: Write a function that converts a positive integer to a negative integer or a negative integer to a positive integer using the bitwise NOT operator. The function should be named convert_to_negative if converting to negative, and convert_to_positive if converting to positive. Provide assertions to test the correctness of the implementation.
  
  def convert_to_negative(x):
      return ~x + 1
  
  def convert_to_positive(x):
      return ~(x-1)
  
  assert convert_to_negative(5) == -5
  assert convert_to_negative(-3) == 3
  assert convert_to_positive(7) == -7
  assert convert_to_positive(-10) == 10
output: def convert_to_negative(x):
      return ~x + 1
  
  def convert_to_positive(x):
      return ~(x-1)