'Check if the specified function will be reached with certain arguments.
:param cfg:
:param state:
:param peek_blocks:
:return:'

def check(self, cfg, state, peek_blocks):

    node = self._get_cfg_node(cfg, state)
    if (node is None):
        l.error('Failed    to    find    CFGNode    for    state    %s    on    the    control    flow    graph.', state)
        return False
    for (src, dst) in self._dfs_edges(cfg.graph, node, max_steps=peek_blocks):
        the_node = None
        if (src.addr == self.function.addr):
            the_node = src
        elif (dst.addr == self.function.addr):
            the_node = dst
        if (the_node is not None):
            if (self.arguments is None):
                return True
            else:
                arch = state.arch
                state = the_node.input_state
                same_arguments = self._check_arguments(arch, state)
                if same_arguments:
                    return True
    l.debug('SimState    %s    will    not    reach    function    %s.', state, self.function)
    return False
