input: Write a function to create a class in Python that represents a complex number. The class should have an initialization method (__init__) that takes two parameters, real and imaginary, representing the real and imaginary parts of the complex number respectively. The class should also have a string representation method (__str__) that returns the complex number in the format "(real + imaginary i)".
  
  assert ComplexNumber(2, 3).__str__() == "(2 + 3i)"
  assert ComplexNumber(0, 5).__str__() == "(0 + 5i)"
  assert ComplexNumber(-1, -1).__str__() == "(-1 + -1i)"
  assert ComplexNumber(4, 0).__str__() == "(4 + 0i)"
  
  
  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)
  
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)