'Convert a CFGNode instance to a CodeNode object.
:param angr.analyses.CFGNode cfg_node: The CFGNode instance.
:return: A converted CodeNode instance.
:rtype: CodeNode'

def _to_snippet(self, cfg_node, jumpkind=None):

    addr = cfg_node.addr
    if (self.project.is_hooked(addr) and (jumpkind != 'Ijk_NoHook')):
        hooker = self.project._sim_procedures[addr]
        size = hooker.kwargs.get('length', 0)
        return HookNode(addr, size, type(hooker))
    return BlockNode(cfg_node.addr, cfg_node.size)
