Remove those return_from_call edges that actually do not return due to
        calling some not-returning functions.
        :return: None
434976
def _remove_non_return_edges(self):
        
        for func in self.kb.functions.values():
            graph = func.transition_graph
            all_return_edges = [(u, v) for (u, v, data) in graph.edges(data=True) if data['type'] == 'return_from_call']
            for return_from_call_edge in all_return_edges:
                callsite_block_addr, return_to_addr = return_from_call_edge
                call_func_addr = func.get_call_target(callsite_block_addr)
                if call_func_addr is None:
                    continue

                call_func = self.kb.functions.function(call_func_addr)
                if call_func is None:
                    # Weird...
                    continue

                if call_func.returning is False:
                    # Remove that edge!
                    graph.remove_edge(call_func_addr, return_to_addr)
                    # Remove the edge in CFG
                    nodes = self.get_all_nodes(callsite_block_addr)
                    for n in nodes:
                        successors = self.get_successors_and_jumpkind(n, excluding_fakeret=False)
                        for successor, jumpkind in successors:
                            if jumpkind == 'Ijk_FakeRet' and successor.addr == return_to_addr:
                                self.remove_edge(n, successor)
1105155
def none_returns(func):
    

    @functools.wraps(func)
    def _execute(*args, **kwargs):
        """Executes function, if error returns None else value of function

        :param args: args of function
        :param kwargs: extra args of function
        :param *args: args
        :param **kwargs: extra args
        :return: None else value of function
        """

        try:
            return func(*args, **kwargs)
        except:
            return None

    return _execute
272190
def out_edges(self, node):
        
        try:
            return list(self.nodes[node][1])
        except KeyError:
            raise GraphError('Invalid node %s' % node)

        return None
1148492
def _removeBackrefs( senderkey):
    """"""
    try:
        signals = connections[senderkey]
    except KeyError:
        signals = None
    else:
        items = signals.items()
        def allReceivers( ):
            for signal,set in items:
                for item in set:
                    yield item
        for receiver in allReceivers():
            _killBackref( receiver, senderkey )
515756
def filter_not_t(func):
    
    return Transformation('filter_not({0})'.format(name(func)),
                          partial(six.moves.filterfalse, func),
                          {ExecutionStrategies.PARALLEL})
989866
def removeFunction(self):
        
        root = self.etree
        t_execute = root.find('execute')
        try:
            root.remove(t_execute)
            return True
        except (Exception,) as e:
            print(e)

        return False
322357
def restore_edge(self, edge):
        
        try:
            head_id, tail_id, data = self.hidden_edges[edge]
            self.nodes[tail_id][0].append(edge)
            self.nodes[head_id][1].append(edge)
            self.edges[edge] = head_id, tail_id, data
            del self.hidden_edges[edge]
        except KeyError:
            raise GraphError('Invalid edge %s' % edge)
1175038
def const_return(func):
    
    result = _undef

    def ret_call(*args, **kwargs):
        nonlocal result
        if result is _undef:
            result = func(*args, **kwargs)
        return result

    return ret_call
1158540
def strip(self, inplace=False):
        
        if not inplace:
            t = self.copy()
        else:
            t = self
        for e in t._tree.preorder_edge_iter():
            e.length = None
        t._dirty = True
        return t
856748
def unlink(self, func):
        '''
        

        '''
        if func in self._syn_links:
            self._syn_links.remove(func)
39254
def close(self):
        '''
        '''
        if self.closed: return
        for func,arglist in self.callbacks:
            apply(func, arglist)
        self.closed = True
1366039
def _enable_cleanup(func):
    

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        self = args[0]
        result = func(*args, **kwargs)
        self.cleanup(self)
        return result

    return wrapper
1372510
def clear(self):
        
        # self.graph = nx.Graph()
        self.graph.clear()
        self.data.clear()
        self.descriptors.clear()
        self.size2d = None
        self.rings = None
        self.scaffolds = None
        self.isolated = None
291865
def ignore_further_calls_to_server(self, server):
        
        log.error(u'ignoring further calls to {}'.format(server))
        self.api.servers.remove(server)
961450
def remove_edge(edge)
      delete_edge(edge)
      edge.each_vertex { |vertex| callback(vertex, :edge_removed, edge) }
    end
377065
def remove_edge(self, u, v):
        
        try:
            del self.succ[u][v]
        except KeyError:
            raise NetworkXError(
                "The edge {}-{} is not in the graph.".format(u, v)
            )
783758
def removeReference(self, fromnode, tonode):
        
        if fromnode is None:
            fromnode = self
        fromident = self.getIdent(fromnode)
        toident = self.getIdent(tonode)
        if fromident is not None and toident is not None:
            while True:
                edge = self.graph.edge_by_node(fromident, toident)
                if edge is None:
                    break
                self.graph.hide_edge(edge)