def get_max_assocs_in_sample_csr(assoc_mat):
    """
    Returns the maximum number of co-associations a sample has and the index of
    that sample.
    """

    first_col = assoc_mat.indptr

    n_cols = first_col[1:] - first_col[:-1]
    max_row_size = n_cols.max()
    max_row_idx = n_cols.argmax()
    return max_row_size, max_row_idx