def prepare_for_new_session(self):
        """Create objects to help manage data."""
        ### reference data from APP_REFS locally
        data = APP_REFS.data

        ### retrieve the value in the NODES_KEY key
        ### from the native file data and store in an
        ### attribute
        self.nodes_data = data.setdefault(NODES_KEY, {})

        ### load scripts to use callables provided by
        ### them as specifications for nodes
        load_scripts(data["node_packs"], data["installed_node_packs"])

        ### clear lists of viewer objects

        self.preview_toolbars.clear()
        self.preview_panels.clear()

        ### store reference to value in the PARENT_SOCKETS_KEY
        ### key from the native data
        self.parent_sockets_data = data.setdefault(PARENT_SOCKETS_KEY, [])

        ### create sets containing ids of parent output sockets and
        ### parented input sockets

        self.parent_sockets_ids = frozenset(
            a_dict['id']
            for a_dict in self.parent_sockets_data
        )

        self.parented_sockets_ids = frozenset(
            child['id']
            for a_dict in self.parent_sockets_data
            for child in a_dict['children']
        )

        ### instantiate nodes
        self.instantiate_nodes()

        ### delete the sets created previously

        del self.parent_sockets_ids
        del self.parented_sockets_ids

        ### execute method to perform socket parenting setups
        self.setup_parent_sockets_data()

        ### retrieve the value in the TEXT_BLOCKS_KEY key
        ### from the file data and store in an attribute

        self.text_blocks_data = data.setdefault(TEXT_BLOCKS_KEY, [])

        ### instantiate text blocks
        self.instantiate_text_blocks()
Create objects to help manage data.
nodezator/graphman/main.py