def get_history(self, current_project_only=True):
        """Return a copy of the requested history (global or project-specific): closed files followed by opened files"""
        # Make sure the history is loaded
        # TODO: If we have loaded history previously we should cache it and not access the file system again
        if len(self.history) == 0:
            self.__load_history()

        # Load the requested history (global or project-specific)
        if current_project_only:
            self.project_name = self.get_current_project_key()
        else:
            self.project_name = 'global'

        # Return the list of closed and opened files
        if self.project_name in self.history:
            # Return a copy of the contained lists in history (the only actually mutated objects)
            history = self.history[self.project_name]
            return dict(opened=history['opened'][:], closed=history['closed'][:])
        else:
            self.debug('WARN: Project %s could not be found in the file history list - returning an empty history list' % (self.project_name))
            return dict(opened=[], closed=[])
dataset/ETHPy150Open FichteFoll/FileHistory/file_history.py/FileHistory.get_history/original