def _compute_gradient_matrix(self, size: int) -> np.ndarray:
        """
        Compute the gradient of the FIR output with respect to the FIR input. The gradient computation result is stored
        as a matrix.

        :param size: The size of the FIR input or output.
        :return: A gradient matrix.
        """
        # Initialize gradients redundantly
        grad_matrix = np.zeros(shape=(size, size + self.numerator_coef.size - 1))

        # Compute gradients
        flipped_numerator_coef = np.flip(self.numerator_coef)
        for i in range(size):
            grad_matrix[i, i : i + self.numerator_coef.size] = flipped_numerator_coef

        # Remove temporary gradients
        grad_matrix = grad_matrix[:, self.numerator_coef.size - 1 :]

        return grad_matrix

        Compute the gradient of the FIR output with respect to the FIR input. The gradient computation result is stored
        as a matrix.

        :param size: The size of the FIR input or output.
        :return: A gradient matrix.
        
art/preprocessing/audio/l_filter/numpy.py