human
Complete this python program:
def _inline_arraycall(func_ir, cfg, visited, loop, enable_prange=False):
assistant
#Here is the Python program you requested.

    """Look for array(list) call in the exit block of a given loop, and turn list operations into
    array operations in the loop if the following conditions are met:
    1. The exit block contains an array call on the list;
    2. The list variable is no longer live after array call;
    3. The list is created in the loop entry block;
    4. The loop is created from an range iterator whose length is known prior to the loop;
    5. There is only one list_append operation on the list variable in the loop body;
    6. The block that contains list_append dominates the loop head, which ensures list
    length is the same as loop length;
    If any condition check fails, no modification will be made to the incoming IR.
    """
    debug_print = _make_debug_print('inline_arraycall')
    require((len(loop.exits) == 1))
    exit_block = next(iter(loop.exits))
    (list_var, array_call_index, array_kws) = _find_arraycall(func_ir, func_ir.blocks[exit_block])
    dtype_def = None
    dtype_mod_def = None
    if ('dtype' in array_kws):
        require(isinstance(array_kws['dtype'], ir.Var))
        dtype_def = _get_definition(func_ir, array_kws['dtype'])
        require((isinstance(dtype_def, ir.Expr) and (dtype_def.op == 'getattr')))
        dtype_mod_def = _get_definition(func_ir, dtype_def.value)
    list_var_def = _get_definition(func_ir, list_var)
    debug_print('list_var    =    ', list_var, '    def    =    ', list_var_def)
    if (isinstance(list_var_def, ir.Expr) and (list_var_def.op == 'cast')):
        list_var_def = _get_definition(func_ir, list_var_def.value)
    require((isinstance(list_var_def, ir.Expr) and (list_var_def.op == 'build_list')))
    list_append_stmts = []
    for label in loop.body:
        in_visited_loops = [(l.header in visited) for l in cfg.in_loops(label)]
        if (not all(in_visited_loops)):
            continue
        block = func_ir.blocks[label]
        debug_print('check    loop    body    block    ', label)
        for stmt in block.find_insts(ir.Assign):
            lhs = stmt.target
            expr = stmt.value
            if (isinstance(expr, ir.Expr) and (expr.op == 'call')):
                func_def = _get_definition(func_ir, expr.func)
                if (isinstance(func_def, ir.Expr) and (func_def.op == 'getattr') and (func_def.attr == 'append')):
                    list_def = _get_definition(func_ir, func_def.value)
                    debug_print('list_def    =    ', list_def, (list_def == list_var_def))
                    if (list_def == list_var_def):
                        list_append_stmts.append((label, block, stmt))
    require((len(list_append_stmts) == 1))
    (append_block_label, append_block, append_stmt) = list_append_stmts[0]
    preds = set((l for (l, b) in...