code: def top_proportions(mtx, n):
      
      if issparse(mtx):
          if not isspmatrix_csr(mtx):
              mtx = csr_matrix(mtx)
          # Allowing numba to do more
          return top_proportions_sparse_csr(mtx.data, mtx.indptr, np.array(n))
      else:
          return top_proportions_dense(mtx, n)
docs: Calculates cumulative proportions of top expressed genes
  
      Parameters
      ----------
      mtx : `Union[np.array, sparse.spmatrix]`
          Matrix, where each row is a sample, each column a feature.
      n : `int`
          Rank to calculate proportions up to. Value is treated as 1-indexed,
          `n=50` will calculate cumulative proportions up to the 50th most
          expressed gene.