input: Write a function to create a function that returns a class representing complex numbers in Python. The class should have a constructor to initialize the real and imaginary parts and a string representation method to display the complex number in the form "(real + imaginary i)". If the input is not provided, the default values for real and imaginary parts should be 0.
  
  
  class ComplexNumber:
      def __init__(self, real=0, imaginary=0):
          self.real = real
          self.imaginary = imaginary
  
      def __str__(self):
          return "({0} + {1}i)".format(self.real, self.imaginary)
  
  
  assert ComplexNumber(2, 3) == (2 + 3i)
  assert ComplexNumber(-1, 5) == (-1 + 5i)
  assert ComplexNumber(0, -4) == (0 - 4i)
  assert ComplexNumber() == (0 + 0i)
output: class ComplexNumber:
      def __init__(self, real=0, imaginary=0):
          self.real = real
          self.imaginary = imaginary
  
      def __str__(self):
          return "({0} + {1}i)".format(self.real, self.imaginary)