code: def test_pascal(self):
      # Test pascal triangle.
      # Nilpotent exponential, used to trigger a failure (gh-8029)
  
      for scale in [1.0, 1e-3, 1e-6]:
          for n in range(120):
              A = np.diag(np.arange(1, n + 1), -1) * scale
              B = expm(A)
  
              sc = scale ** np.arange(n, -1, -1)
              if np.any(sc < 1e-300):
                  continue
  
              got = B
              expected = (
                  binom(
                      np.arange(n + 1)[:, None],
                      np.arange(n + 1)[None, :],
                  )
                  * sc[None, :]
                  / sc[:, None]
              )
              err = abs(expected - got).max()
              atol = 1e-13 * abs(expected).max()
              assert_allclose(got, expected, atol=atol)
  
imports: from __future__ import division, print_function, absolute_import
  import math
  import numpy
  from numpy import array, eye, exp, random
  from numpy.linalg import matrix_power
  from numpy.testing import assert_allclose, assert_, assert_array_almost_equal, assert_equal, assert_array_almost_equal_nulp
  from scipy._lib._numpy_compat import suppress_warnings
  from scipy.sparse import csc_matrix, SparseEfficiencyWarning
  from scipy.sparse.construct import eye
  from scipy.sparse.linalg.matfuncs import expm, _expm, ProductOperator, MatrixPowerOperator, _onenorm_matrix_power_nnm
  from scipy.sparse.sputils import matrix
  from scipy.linalg import logm
  from scipy.special import factorial, binom
  import scipy.sparse
  import scipy.sparse.linalg
label_desc: Use image node_id 28 for calling the TestExpM obj's underlying member method code with example usage: obj.test_pascal() without return types