code: def check_forward(self, diag_data, non_diag_data):
      diag = chainer.Variable(diag_data)
      non_diag = chainer.Variable(non_diag_data)
      y = lower_triangular_matrix(diag, non_diag)
  
      correct_y = numpy.zeros(
          (self.batch_size, self.n, self.n), dtype=numpy.float32
      )
  
      tril_rows, tril_cols = numpy.tril_indices(self.n, -1)
      correct_y[:, tril_rows, tril_cols] = cuda.to_cpu(non_diag_data)
  
      diag_rows, diag_cols = numpy.diag_indices(self.n)
      correct_y[:, diag_rows, diag_cols] = cuda.to_cpu(diag_data)
  
      gradient_check.assert_allclose(correct_y, cuda.to_cpu(y.array))
  
file_path: chainerrl/tests/functions_tests/test_lower_triangular_matrix.py
imports: import unittest
  import numpy
  import chainer
  from chainer import cuda
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
  from chainerrl.functions.lower_triangular_matrix import lower_triangular_matrix
  from chainerrl.functions.lower_triangular_matrix import LowerTriangularMatrix
label_desc: Use image node_id 2 for calling the TestLowerTriangularMatrix obj's underlying member method code with example usage: obj.check_forward(diag_data, non_diag_data) without return types