code: def test_logm_consistency(self):
      random.seed(1234)
      for dtype in [np.float64, np.complex128]:
          for n in range(1, 10):
              for scale in [1e-4, 1e-3, 1e-2, 1e-1, 1, 1e1, 1e2]:
                  # make logm(A) be of a given scale
                  A = (eye(n) + random.rand(n, n) * scale).astype(dtype)
                  if np.iscomplexobj(A):
                      A = A + 1j * random.rand(n, n) * scale
                  assert_array_almost_equal(expm(logm(A)), A)
  
imports: 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, 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 10 for calling the TestExpM obj's underlying member method code with example usage: obj.test_logm_consistency() without return types