Flip colors of a node and its children.

def flip(self):
        """
        Flip colors of a node and its children.
        """

        left = self.left._replace(red=not self.left.red)
        right = self.right._replace(red=not self.right.red)
        top = self._replace(left=left, right=right, red=not self.red)
        return top