(self, current_search_node_id, sketch)
return current_search_node
Helper function: Returns Current Search Node object givin a search
            node id

        Args:
            current_search_node_id: search node id
                        sketch: Sketch object

        Returns:
            Search history object representing the current search node
Helper function: Returns Current Search Node object givin a search
            node id
Helper function : Returns Current Search Node object givin a search node id
def _get_current_search_node(self, current_search_node_id, sketch):
        """Helper function: Returns Current Search Node object givin a search
            node id

        Args:
            current_search_node_id: search node id
                        sketch: Sketch object

        Returns:
            Search history object representing the current search node
        """
        current_search_node = SearchHistory.query.get(current_search_node_id)
        if not current_search_node:
            abort(
                HTTP_STATUS_CODE_NOT_FOUND,
                'No search history found with this ID'
            )
        if not current_search_node.sketch == sketch:
            abort(
                HTTP_STATUS_CODE_BAD_REQUEST,
                'Wrong sketch for this search history'
            )
        if not current_search_node.user == current_user:
            abort(
                HTTP_STATUS_CODE_BAD_REQUEST,
                'Wrong user for this search history'
            )
        return current_search_node
def _get_current_search_node ( self , current_search_node_id , sketch ) : current_search_node = SearchHistory . query . get ( current_search_node_id ) if not current_search_node : abort ( HTTP_STATUS_CODE_NOT_FOUND , 'No search history found with this ID' ) if not current_search_node . sketch == sketch : abort ( HTTP_STATUS_CODE_BAD_REQUEST , 'Wrong sketch for this search history' ) if not current_search_node . user == current_user : abort ( HTTP_STATUS_CODE_BAD_REQUEST , 'Wrong user for this search history' ) return current_search_node