'Add a transition edge to the function transiton map.
:param int addr: Address that the control flow transits to.
:param CFGNode src_node: The source node that the control flow transits from.
:param int function_addr: Function address.
:return: True if the edge is correctly added. False if any exception occurred (for example, the target address
does not exist)
:rtype: bool'

def _function_add_transition_edge(self, addr, src_node, function_addr, to_outside=False, to_function_addr=None, stmt_idx=None, ins_addr=None):

    try:
        try:
            target = self._to_snippet(self._nodes[addr])
        except KeyError:
            target = addr
        if (src_node is None):
            self.kb.functions._add_node(function_addr, target)
        else:
            src_node = self._to_snippet(src_node)
            if (not to_outside):
                self.kb.functions._add_transition_to(function_addr, src_node, target, stmt_idx=stmt_idx, ins_addr=ins_addr)
            else:
                self.kb.functions._add_outside_transition_to(function_addr, src_node, target, to_function_addr=to_function_addr, stmt_idx=stmt_idx, ins_addr=ins_addr)
        return True
    except (SimMemoryError, SimEngineError):
        return False
