def get_dct_filter(seq_len: int, mapper_y: list, in_channels: int):
        """
        Util function to get the DCT filter.

        Parameters
        ----------
        seq_len: int
            Size of the sequence
        mapper_y:
            List of frequencies
        in_channels:
            Number of input channels.

        Returns
        -------
        torch.Tensor
        """
        dct_filter = torch.zeros(in_channels, seq_len)

        c_part = in_channels // len(mapper_y)

        for i, v_y in enumerate(mapper_y):
            for t_y in range(seq_len):
                filter = math.cos(math.pi * v_y * (t_y + 0.5) / seq_len) / math.sqrt(
                    seq_len
                )
                filter = filter * math.sqrt(2) if v_y != 0 else filter
                dct_filter[i * c_part : (i + 1) * c_part, t_y] = filter
        return dct_filter

        Util function to get the DCT filter.

        Parameters
        ----------
        seq_len: int
            Size of the sequence
        mapper_y:
            List of frequencies
        in_channels:
            Number of input channels.

        Returns
        -------
        torch.Tensor
        
braindecode/modules/attention.py