def remove_node(self, node):

        trans_id = self._gen_transaction()

        if self.legacy_mode:
            successors = self.get_successors(node)
            predecessors = self.get_predecessors(node)

            for attribut_name in self.get_attributs_list(node):
                #remove each attribut of the node
                self._remove_attribut(node, attribut_name, trans_id)

            for successor in successors:
                #here, only handle the succesors
                #(node will be removed completely later)
                self._remove_predecessor(successor, node, trans_id)
                self._handle_no_predecessor_legacy(successor, trans_id)
 
                self.logger.debug("ensure node %(node)s is no longer"\
                    " predecessor of %(successor)s" % {
                    'successor': successor, 
                    'node': node
                    }
                )

            for predecessor in predecessors:
                #here, only handle the predecessor
                #(node will be removed completely later)
                self._remove_successor(node, predecessors, trans_id)
                self._handle_no_predecessor_legacy(predecessor, trans_id)
 
                self.logger.debug("ensure node %(node)s is no longer"\
                    " successor of %(predecessor)s" % {
                    'predecessor': predecessor,
                    'node': node
                    }
                )
        else:
            base_key = self._gen_key(node,[])
            self.remove_all_attributes_script(args=[base_key], 
                client=self.transactions[trans_id])
            self.remove_node_successors_predecessors_script(args=[node],
                client=self.transactions[trans_id])


        self.logger.debug("remove node %(node)s from database" % {
            'node': node
            }
        )
 
        #remove all the other keys of the node
        redis_key = self._gen_key(node, ['attributs_list', ])
        self.transactions[trans_id].delete(redis_key)

        redis_key = self._gen_key(node, ['successors', ])
        self.transactions[trans_id].delete(redis_key)

        redis_key = self._gen_key(node, ['predecessors', ])
        self.transactions[trans_id].delete(redis_key)

        self.transactions[trans_id].execute()

        #if we use older versions of redis server or redis-python, no lua script
        if self.legacy_mode:
            for successor in successors:
                self._handle_no_predecessor_legacy(successor, trans_id)
            for predecessor in predecessors:
                self._handle_no_predecessor_legacy(predecessor, trans_id)
            self.transactions[trans_id].execute()
            self._clean_root(trans_id)
            self.transactions[trans_id].execute()
        del self.transactions[trans_id]
completly remove a given node from the graph
dataset/ETHPy150Open kakwa/pygraph_redis/pygraph_redis/directed_graph.py/Directed_graph.remove_node