<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_to_data(self, in_place=False):
 """Save index to data structure. :param in_place: Do not copy index value to a new list object :type in_place: bool :return: Index data structure :rtype: list """

        if in_place:
            return [
                list(self._index.items()),
                list(self._undefined_keys.keys())
            ]
        return (
            [(key, values[:]) for key, values in self._index.items()],
            list(self._undefined_keys.keys()),
        )