input: Write a function to create a class in Python that represents a complex number. The class should have an initializer that takes two parameters, `real` and `imaginary`, to set the real and imaginary parts of the complex number. The class should also have a `__str__` method that returns the complex number in the format "({real} + {imaginary}i)".
  
  
  assert str(ComplexNumber(2, 3))=="(2 + 3i)"
  assert str(ComplexNumber(-1, 0))=="(-1 + 0i)"
  assert str(ComplexNumber(0, -1))=="(0 + -1i)"
  assert str(ComplexNumber(0, 0))=="(0 + 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)