code: def _test_variant_input_type_prediction(to_tensor, convert_to):
      prog = Program()
      func_inputs = {
          "x": mb.placeholder(shape=[2, 3]),
          "y": mb.placeholder(shape=[2, 3]),
      }
      with Function(func_inputs) as ssa_fun:
          x, y = ssa_fun.inputs["x"], ssa_fun.inputs["y"]
          x = mb.relu(x=x, name="relu")
          z = mb.add(x=x, y=y, name="out")
          ssa_fun.set_outputs([z])
      prog.add_function("main", ssa_fun)
  
      mlmodel = ct.convert(prog, convert_to=convert_to)
      x_numpy = np.random.rand(2, 3)
      y_numpy = np.random.rand(2, 3)
      out_by_numpy = mlmodel.predict({"x": x_numpy, "y": y_numpy})
      out_by_tensor = mlmodel.predict(
          {"x": to_tensor(x_numpy), "y": to_tensor(y_numpy)}
      )
      np.allclose(out_by_numpy["out"], out_by_tensor["out"])
  
imports: import copy
  import os
  import tempfile
  import numpy
  import pytest
  import coremltools
  from coremltools._deps import _HAS_TORCH
  from coremltools.converters.mil import Builder
  from coremltools.converters.mil.mil import Function, Program, get_new_symbol
  from coremltools.converters.mil.testing_utils import get_op_types_in_program
label_desc: Use image node_id 2 for calling the TestInputs obj's underlying member method code with example usage: obj._test_variant_input_type_prediction(to_tensor, convert_to) without return types