def METHOD_NAME(entry_name, graph):
    blocks = {}
    for block_name in graph:
        blocks[block_name] = MockBasicBlock(block_name)
    for block_name in graph:
        successors = list(map(lambda name: blocks[name], graph[block_name]))
        blocks[block_name].set_successors(successors)
    return MockFunction(blocks[entry_name], blocks.values())