def _adjust_func_inputs(func):
    """
    Changes the dtype of the provided variable according
    to the rules outlined in the top level pass comment
    (see adjust_io_to_supported_types).
    """
    _RUNTIME_SUPPORTED_TYPES = _get_runtime_supported_types(func.opset_version)

    for input_name, input_var in func.inputs.items():
        if (
            types.is_tensor(input_var.sym_type) or types.is_scalar(input_var.sym_type)
        ) and input_var.dtype not in _RUNTIME_SUPPORTED_TYPES:
            dtype_str = types.builtin_to_string(input_var.dtype)
            convert_to_dtype = types.int32 if types.is_int(input_var.dtype) else types.fp32
            convert_to_dtype_str = types.builtin_to_string(convert_to_dtype)
            _adjust_var_dtype_helper(input_var, convert_to_dtype)
            logger.warning(
                f"Input '{input_var.name}' is of dtype {dtype_str}, which is not"
                f"supported by the Core ML runtime. This input will be changed to "
                f"{convert_to_dtype_str}. No cast will be inserted."
            )

    Changes the dtype of the provided variable according
    to the rules outlined in the top level pass comment
    (see adjust_io_to_supported_types).
    
coremltools/converters/mil/backend/mil/passes/adjust_io_to_supported_types.py