'Generate a sub control flow graph of instruction addresses based on self.graph
:param iterable ins_addrs: A collection of instruction addresses that should be included in the subgraph.
:return: A subgraph.
:rtype: networkx.DiGraph'

def subgraph(self, ins_addrs):

    blocks = []
    block_addr_to_insns = {}
    for b in self._local_blocks.itervalues():
        block = self._get_block(b.addr, size=b.size)
        common_insns = set(block.instruction_addrs).intersection(ins_addrs)
        if common_insns:
            blocks.append(b)
            block_addr_to_insns[b.addr] = sorted(common_insns)
    subgraph = networkx.subgraph(self.graph, blocks)
    g = networkx.DiGraph()
    for n in subgraph.nodes_iter():
        insns = block_addr_to_insns[n.addr]
        in_edges = subgraph.in_edges(n)
        if (len(in_edges) > 1):
            if (n.addr not in insns):
                insns = ([n.addr] + insns)
        for (src, _) in in_edges:
            last_instr = block_addr_to_insns[src.addr][(-1)]
            g.add_edge(last_instr, insns[0])
        for i in xrange(0, (len(insns) - 1)):
            g.add_edge(insns[i], insns[(i + 1)])
    return g
