def METHOD_NAME(
    self, input_dtype, output0_dtype, output1_dtype, output0_raw, output1_raw, swap
):
    def _infer_exact_helper(
        tester,
        pf,
        tensor_shape,
        batch_size,
        input_dtype,
        output0_dtype,
        output1_dtype,
        output0_raw=True,
        output1_raw=True,
        model_version=None,
        swap=False,
        outputs=("OUTPUT0", "OUTPUT1"),
        use_http=True,
        use_grpc=True,
        skip_request_id_check=False,
        use_streaming=True,
        correlation_id=0,
    ):
        for bs in (1, batch_size):
            iu.infer_exact(
                tester,
                pf,
                (bs,) + tensor_shape,
                bs,
                input_dtype,
                output0_dtype,
                output1_dtype,
                output0_raw=output0_raw,
                output1_raw=output1_raw,
                model_version=model_version,
                swap=swap,
                outputs=outputs,
                use_http=use_http,
                use_grpc=use_grpc,
                skip_request_id_check=skip_request_id_check,
                use_streaming=use_streaming,
                correlation_id=correlation_id,
            )
    input_size = 16
    if tu.validate_for_tf_model(
        input_dtype,
        output0_dtype,
        output1_dtype,
        (input_size,),
        (input_size,),
        (input_size,),
    ):
        for pf in ["graphdef", "savedmodel"]:
            if pf in TEST_BACKENDS:
                _infer_exact_helper(
                    self,
                    pf,
                    (input_size,),
                    8,
                    input_dtype,
                    output0_dtype,
                    output1_dtype,
                    output0_raw=output0_raw,
                    output1_raw=output1_raw,
                    swap=swap,
                )
    if tu.validate_for_trt_model(
        input_dtype,
        output0_dtype,
        output1_dtype,
        (input_size, 1, 1),
        (input_size, 1, 1),
        (input_size, 1, 1),
    ):
        if "plan" in TEST_BACKENDS:
            if input_dtype == np.int8:
                shape = (input_size, 1, 1)
            else:
                shape = (input_size,)
            _infer_exact_helper(
                self,
                "plan",
                shape,
                8,
                input_dtype,
                output0_dtype,
                output1_dtype,
                output0_raw=output0_raw,
                output1_raw=output1_raw,
                swap=swap,
            )
    if tu.validate_for_onnx_model(
        input_dtype,
        output0_dtype,
        output1_dtype,
        (input_size,),
        (input_size,),
        (input_size,),
    ):
        if "onnx" in TEST_BACKENDS:
            _infer_exact_helper(
                self,
                "onnx",
                (input_size,),
                8,
                input_dtype,
                output0_dtype,
                output1_dtype,
                output0_raw=output0_raw,
                output1_raw=output1_raw,
                swap=swap,
            )
    # Skip for batched string I/O
    if tu.validate_for_libtorch_model(
        input_dtype,
        output0_dtype,
        output1_dtype,
        (input_size,),
        (input_size,),
        (input_size,),
        8,
    ):
        if "libtorch" in TEST_BACKENDS:
            _infer_exact_helper(
                self,
                "libtorch",
                (input_size,),
                8,
                input_dtype,
                output0_dtype,
                output1_dtype,
                output0_raw=output0_raw,
                output1_raw=output1_raw,
                swap=swap,
            )