code: def setup(self, n, density):
      # Create random sparse matrices. Note that we could use
      # scipy.sparse.rand for this purpose, but simply using np.random and
      # disregarding duplicates is quite a bit faster.
      rng = np.random.default_rng(42)
      d = rng.integers(0, n, size=(int(n * n * density), 2))
      graph = scipy.sparse.csr_matrix(
          (np.ones(len(d)), (d[:, 0], d[:, 1])), shape=(n, n)
      )
      self.graph = graph
  
file_path: scipy/benchmarks/benchmarks/sparse_csgraph_matching.py
imports: import numpy
  import scipy.sparse
  from scipy.spatial.distance import cdist
  from .common import Benchmark, safe_import
label_desc: Use image node_id 1 for calling the MaximumBipartiteMatching obj's underlying member method code with example usage: obj.setup(n, density) without return types