code: def test_interpreter_multi_input(use_iterator):
      x = tf.keras.Input((24, 24, 2))
      y = tf.keras.Input((24, 24, 1))
      model = tf.keras.Model(
          [x, y],
          [tf.keras.layers.Flatten()(x), tf.keras.layers.Flatten()(y)],
      )
      converter = tf.lite.TFLiteConverter.from_keras_model(model)
  
      x_np = np.random.uniform(-1, 1, size=(16, 24, 24, 2)).astype(
          np.float32
      )
      y_np = np.random.uniform(-1, 1, size=(16, 24, 24, 1)).astype(
          np.float32
      )
      expected_output_x = x_np.reshape(16, -1)
      expected_output_y = y_np.reshape(16, -1)
  
      interpreter = Interpreter(converter.convert(), num_threads=2)
      assert interpreter.input_types == [np.float32, np.float32]
      assert interpreter.output_types == [np.float32, np.float32]
      assert sorted(interpreter.input_shapes) == [
          (1, 24, 24, 1),
          (1, 24, 24, 2),
      ]
      assert sorted(interpreter.output_shapes) == [
          (1, 24 * 24 * 1),
          (1, 24 * 24 * 2),
      ]
  
      # Input order is not deterministic, decide based on shape
      if interpreter.input_shapes[0][-1] == 1:
          x_np, y_np = y_np, x_np
  
      def input_fn():
          if use_iterator:
              return ([x, y] for x, y in zip(x_np, y_np))
          return [x_np, y_np]
  
      output_x, output_y = interpreter.predict(input_fn())
      # Output order is not deterministic, decide based on shape
      if output_y.shape == expected_output_x.shape:
          output_x, output_y = output_y, output_x
      np.testing.assert_allclose(output_x, expected_output_x)
      np.testing.assert_allclose(output_y, expected_output_y)
  
imports: import sys
  import numpy
  import pytest
  import tensorflow
  from larq_compute_engine.tflite.python.interpreter import Interpreter
label_desc: Use image node_id 2 for calling a global function with example usage: test_interpreter_multi_input(use_iterator) and returns: list, unknown