'Concatenate the columns for variance components to the columns
for other random effects to obtain a single random effects
exog matrix for a given group.'

def _augment_exog(self, group_ix):

    ex_r = (self.exog_re_li[group_ix] if (self.k_re > 0) else None)
    if (self.k_vc == 0):
        return ex_r
    group = self.group_labels[group_ix]
    ex = ([ex_r] if (self.k_re > 0) else [])
    any_sparse = False
    for (j, k) in enumerate(self._vc_names):
        if (group not in self.exog_vc[k]):
            continue
        ex.append(self.exog_vc[k][group])
        any_sparse |= sparse.issparse(ex[(-1)])
    if any_sparse:
        for (j, x) in enumerate(ex):
            if (not sparse.issparse(x)):
                ex[j] = sparse.csr_matrix(x)
        ex = sparse.hstack(ex)
        ex = sparse.csr_matrix(ex)
    else:
        ex = np.concatenate(ex, axis=1)
    return ex
