code: def setup(self, n, format):
      rng = np.random.default_rng(1234)
  
      # Let the number of nonzero entries per row
      # scale like the log of the order of the matrix.
      nnz_per_row = int(math.ceil(math.log(n)))
  
      # time the sampling of a random sparse matrix
      self.A_sparse = random_sparse_csc(n, n, nnz_per_row, rng)
  
      # first format conversion
      self.A_dense = self.A_sparse.toarray()
  
file_path: scipy/benchmarks/benchmarks/sparse_linalg_expm.py
imports: import math
  import numpy
  from .common import Benchmark, safe_import
label_desc: Use image node_id 1 for calling the Expm obj's underlying member method code with example usage: obj.setup(n, format) without return types