def get_core_ml_prediction(
    build, input_placeholders, input_values, backend, compute_unit=ct.ComputeUnit.CPU_ONLY
):
    """
    Return predictions of the given model.
    """
    minimum_deployment_target = backend.opset_version
    program = mil.Program()
    with Function(input_placeholders, opset_version=minimum_deployment_target) as ssa_func:
        output_vars = build(**ssa_func.inputs)
        if isinstance(output_vars, tuple):
            output_vars = list(output_vars)
        elif not isinstance(output_vars, list):
            output_vars = [output_vars]
        ssa_func.set_outputs(output_vars)
        program.add_function("main", ssa_func)

    mlmodel = ct_convert(
        program,
        source="milinternal",
        convert_to=(backend.backend, backend.precision),
        compute_units=compute_unit,
        minimum_deployment_target=minimum_deployment_target,
    )
    return mlmodel.predict(input_values)

    Return predictions of the given model.
    
coremltools/converters/mil/testing_utils.py