def forward(self, x):
        """
        Forward pass through the complex-valued bidirectional LSTM.

        Args:
            x (torch.Tensor): Input tensor of shape (b, c, h, T, 2) where:
                - b is the batch size,
                - c is the number of channels,
                - h is the number of hidden units,
                - T is the sequence length,
                - 2 represents the real and imaginary parts.

        Returns:
            torch.Tensor: Output tensor of shape (b, c, h, T, 2).
        """
        # Get the shape of the input tensor
        b, c, h, T, d = x.size()
        # Reshape the input for processing
        x = torch.reshape(x, (b, c*h, T, d))
        # Transpose to prepare for LSTM processing
        x = torch.transpose(x, 0, 2)  # Shape: (T, c*h, d)
        x = torch.transpose(x, 1, 2)  # Shape: (T, d, c*h)

        # Process the real and imaginary parts through LSTM layers
        real_L1 = self.lstm_re_L1(x[..., 0]) - self.lstm_im_L1(x[..., 1])
        imaginary_L1 = self.lstm_re_L1(x[..., 1]) + self.lstm_im_L1(x[..., 0])
        real = self.lstm_re_L2(real_L1) - self.lstm_im_L2(imaginary_L1)
        imaginary = self.lstm_re_L2(imaginary_L1) + self.lstm_im_L2(real_L1)

        # Stack the real and imaginary parts to create the output tensor
        output = torch.stack((real, imaginary), dim=-1)  # Shape: (T, b, h, 2)
        output = torch.transpose(output, 1, 2)  # Shape: (T, h, b, 2)
        output = torch.transpose(output, 0, 2)  # Shape: (b, h, T, 2)
        output = torch.reshape(output, (b, c, h, T, d))  # Shape: (b, c, h, T, 2)

        return output

        Forward pass through the complex-valued bidirectional LSTM.

        Args:
            x (torch.Tensor): Input tensor of shape (b, c, h, T, 2) where:
                - b is the batch size,
                - c is the number of channels,
                - h is the number of hidden units,
                - T is the sequence length,
                - 2 represents the real and imaginary parts.

        Returns:
            torch.Tensor: Output tensor of shape (b, c, h, T, 2).
        
clearvoice/clearvoice/models/frcrn_se/complex_nn.py