input: Write a function to create a class in Python that represents a complex number, where the class should have an initializer to accept real and imaginary parts as inputs and a string representation method to display the complex number in the form (real + imaginaryi).
  
  class ComplexNumber:
      def __init__(self, real, imaginary):
          self.real = real
          self.imaginary = imaginary
  
      def __str__(self):
          return "({0} + {1}i)".format(self.real, self.imaginary)
  
  assert str(ComplexNumber(1, 2)) == "(1 + 2i)"
  assert str(ComplexNumber(-3, 4)) == "(-3 + 4i)"
  assert str(ComplexNumber(0, -5)) == "(0 - 5i)"
output: class ComplexNumber:
      def __init__(self, real, imaginary):
          self.real = real
          self.imaginary = imaginary
  
      def __str__(self):
          return "({0} + {1}i)".format(self.real, self.imaginary)