code: def setup(self, n, solver):
      rng = np.random.default_rng(1234)
      nrepeats = 100
      shape = (int(n), int(n))
  
      if solver == "exact" and n >= 300:
          # skip: slow, and not useful to benchmark
          raise NotImplementedError()
  
      if n <= 1000:
          # Sample the matrices.
          self.matrices = []
          for i in range(nrepeats):
              M = rng.standard_normal(shape)
              self.matrices.append(M)
      else:
          max_nnz = 100000
          nrepeats = 1
  
          self.matrices = []
          for i in range(nrepeats):
              M = scipy.sparse.rand(
                  shape[0],
                  shape[1],
                  min(max_nnz / (shape[0] * shape[1]), 1e-5),
                  random_state=rng,
              )
              self.matrices.append(M)
  
imports: import numpy
  from .common import Benchmark, safe_import
label_desc: Use image node_id 1 for calling the BenchmarkOneNormEst obj's underlying member method code with example usage: obj.setup(n, solver) without return types