code: def track_mmwrite(self, size, implementation, matrix_type):
      size = self.size[size]
  
      code = f"""
          import numpy as np
          import scipy.sparse
          from {implementation} import mmwrite
          
          def generate_coo(size):
              nnz = int(size / (4 + 4 + 8))
              rows = np.arange(nnz, dtype=np.int32)
              cols = np.arange(nnz, dtype=np.int32)
              data = np.random.default_rng().uniform(low=0, high=1.0, size=nnz)
              return scipy.sparse.coo_matrix((data, (rows, cols)), shape=(nnz, nnz))
  
          def generate_csr(size):
              nrows = 1000
              nnz = int((size - (nrows + 1) * 4) / (4 + 8))
              indptr = (np.arange(nrows + 1, dtype=np.float32) / nrows * nnz).astype(np.int32)
              indptr[-1] = nnz
              indices = np.arange(nnz, dtype=np.int32)
              data = np.random.default_rng().uniform(low=0, high=1.0, size=nnz)
              return scipy.sparse.csr_matrix((data, indices, indptr), shape=(nrows, nnz))
          
          def generate_dense(size):
              nnz = size // 8
              return np.random.default_rng().uniform(low=0, high=1.0, size=(1, nnz))
  
  
          a = generate_{matrix_type}({size})
          mmwrite('{self.filename}', a, symmetry='general')
          """  # noqa: E501
      time, peak_mem = run_monitored(code)
      return peak_mem / size
  
imports: from .common import set_mem_rlimit, run_monitored, get_mem_info
  from io import BytesIO, StringIO
  import os
  import tempfile
  import numpy
  from .common import Benchmark, safe_import
label_desc: Use image node_id 6 for calling the MemUsage obj's underlying member method code with example usage: obj.track_mmwrite(size, implementation, matrix_type) and returns: unknown