input: Write a function to create a class in Python to represent a complex number. The class should have an initializer that takes two parameters: the real part and the imaginary part of the complex number. It should also have a `__str__` method to return the complex number in the form "(real + imaginary i)".
  
  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(3, 4)) == "(3 + 4i)"
  assert str(ComplexNumber(-2, -5)) == "(-2 + -5i)"
  assert str(ComplexNumber(0, 0)) == "(0 + 0i)"
  assert str(ComplexNumber(1, 0)) == "(1 + 0i)"
  assert str(ComplexNumber(0, 1)) == "(0 + 1i)"
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)