<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __create_core_and_model_object_copies(self, selection, smart_selection_adaption):
 """Copy all elements of a selection. The method copies all objects and modifies the selection before copying the elements if the smart flag is true. The smart selection adaption is by default enabled. In any case the selection is reduced to have one parent state that is used as the root of copy, except a root state it self is selected. :param Selection selection: an arbitrary selection, whose elements should be copied .param bool smart_selection_adaption: flag to enable smart selection adaptation mode :return: dictionary of selected models copied, parent model of copy """


        all_models_selected = selection.get_all()
        if not all_models_selected:
            logger.warning("Nothing to copy because state machine selection is empty.")
            return

        parent_m = self.do_selection_reduction_to_one_parent(selection)
        self.copy_parent_state_id = parent_m.state.state_id if parent_m else None

        if smart_selection_adaption:
            self.do_smart_selection_adaption(selection, parent_m)

        # store all lists of selection
        selected_models_dict = {}
        for state_element_attr in ContainerState.state_element_attrs:
            selected_models_dict[state_element_attr] = list(getattr(selection, state_element_attr))

        # delete old models
        self.destroy_all_models_in_dict(self.model_copies)
        # copy all selected elements
        self.model_copies = deepcopy(selected_models_dict)

        new_content_of_clipboard = ', '.join(["{0} {1}".format(len(elems), key if len(elems) > 1 else key[:-1])
                                             for key, elems in self.model_copies.items() if elems])
        logger.info("The new content is {0}".format(new_content_of_clipboard.replace('_', ' ')))

        return selected_models_dict, parent_m