'Write configuration values.'

def save_config(self, home_dir=None):

    set_config('MNE_COREG_GUESS_MRI_SUBJECT', str(self.model.guess_mri_subject).lower(), home_dir, set_env=False)
    set_config('MNE_COREG_HEAD_HIGH_RES', str(self.model.mri.use_high_res_head).lower(), home_dir, set_env=False)
    set_config('MNE_COREG_HEAD_OPACITY', str(self.mri_obj.opacity), home_dir, set_env=False)
    set_config('MNE_COREG_SCALE_LABELS', str(self.model.scale_labels).lower(), home_dir, set_env=False)
    set_config('MNE_COREG_COPY_ANNOT', str(self.model.copy_annot).lower(), home_dir, set_env=False)
    set_config('MNE_COREG_PREPARE_BEM', str(self.model.prepare_bem_model).lower(), home_dir, set_env=False)
    if self.model.mri.subjects_dir:
        set_config('MNE_COREG_SUBJECTS_DIR', self.model.mri.subjects_dir, home_dir, set_env=False)
