input: Write a function to determine if it is possible to multiply two given complex numbers and return the result as a new instance of the ComplexNumber class. The function should take in two instances of the ComplexNumber class and return a new ComplexNumber instance representing the product of the two input complex numbers.
  
  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)
  
      def multiply(self, other):
          real_part = self.real * other.real - self.imaginary * other.imaginary
          imaginary_part = self.real * other.imaginary + self.imaginary * other.real
          return ComplexNumber(real_part, imaginary_part)
  
  assert str(ComplexNumber(1, 2).multiply(ComplexNumber(3, 4))) == "( -5 + 10i)"
  assert str(ComplexNumber(0, 1).multiply(ComplexNumber(0, 1))) == "( -1 + 0i)"
  assert str(ComplexNumber(1, 0).multiply(ComplexNumber(0, 1))) == "( 0 + 1i)"
  assert str(ComplexNumber(1, 1).multiply(ComplexNumber(1, -1))) == "( 2 + 0i)"
  assert str(ComplexNumber(2, 3).multiply(ComplexNumber(4, 5))) == "( -7 + 22i)"
output: def multiply(self, other):
      real_part = self.real * other.real - self.imaginary * other.imaginary
      imaginary_part = self.real * other.imaginary + self.imaginary * other.real
      return ComplexNumber(real_part, imaginary_part)