def forward(self, x: torch.Tensor) -> torch.Tensor:
        """
        Forward pass through the Gated FSMN module.
        
        Args:
            x (torch.Tensor): Input tensor of shape (batch_size, in_channels, seq_length).
        
        Returns:
            torch.Tensor: Output tensor after processing through the gated FSMN.
        """
        input = x  # Store the original input for later use
        x_u = self.to_u(x)  # Process input through u-gate
        x_v = self.to_v(x)  # Process input through v-gate
        
        x_u = self.fsmn(x_u)  # Apply FSMN to u-gate output
        
        # Combine the outputs from u-gate and v-gate with the original input
        x = x_v * x_u + input  # Gated output with residual connection
        
        return x  # Return the final output tensor

        Forward pass through the Gated FSMN module.
        
        Args:
            x (torch.Tensor): Input tensor of shape (batch_size, in_channels, seq_length).
        
        Returns:
            torch.Tensor: Output tensor after processing through the gated FSMN.
        
clearvoice/clearvoice/models/mossformer2_ss/mossformer2_block.py