def _switch_fragments(self):
        """
        fragmentsを入力用から出力用に切り替える

        処理内容:
        - 各fragmentの親を自分(self)にする
        """
        logger.info("{header} switch fragment".format(header=self.header))
        output_fragments = OrderedDict()
        for frg_name, frg in self.fragments():
            logger.info(
                "{header} fragment_name: {name}".format(
                    header=self.header, name=frg_name
                )
            )
            new_frg = QcFragment(frg, parent=self)
            assert new_frg.parent.name == self.name
            output_fragments[frg_name] = new_frg
        self._fragments = output_fragments

        # logger.info('merge subgroups')
        # for key, frg in self.fragments():
        #    frg.merge_subgroups()

        logger.info("{header} ---> switch".format(header=self.header))
        for frg_name, frg in self.fragments():
            logger.info(
                "{header} {frg_name}: parent={parent_name}".format(
                    header=self.header, frg_name=frg_name, parent_name=frg.parent.name
                )
            )
        logger.info("{header} <---".format(header=self.header))