def get_max_assocs_in_sample(assoc_mat):
    """
    Returns the maximum number of co-associations a sample has and the index of
    that sample.
    """
    max_row_size=0
    max_row_idx=-1
    row_idx=0
    for row in assoc_mat:
        if row.nonzero()[0].size > max_row_size:
            max_row_size = row.nonzero()[0].size
            max_row_idx = row_idx
        row_idx += 1
        
    return max_row_size, max_row_idx