code: def test_interpreter(use_iterator):
      input_shape = (24, 24, 3)
      x = tf.keras.Input(input_shape)
      model = tf.keras.Model(x, tf.keras.layers.Flatten()(x))
      converter = tf.lite.TFLiteConverter.from_keras_model(model)
  
      inputs = np.random.uniform(-1, 1, size=(16, *input_shape)).astype(
          np.float32
      )
      expected_outputs = inputs.reshape(16, -1)
  
      interpreter = Interpreter(converter.convert())
      assert interpreter.input_types == [np.float32]
      assert interpreter.output_types == [np.float32]
      assert interpreter.input_shapes == [(1, *input_shape)]
      assert interpreter.output_shapes == [(1, np.product(input_shape))]
  
      def input_fn():
          if use_iterator:
              return (input for input in inputs)
          return inputs
  
      outputs = interpreter.predict(input_fn(), 1)
      np.testing.assert_allclose(outputs, expected_outputs)
  
imports: import sys
  import numpy
  import pytest
  import tensorflow
  from larq_compute_engine.tflite.python.interpreter import Interpreter
label_desc: Use image node_id 1 for calling a global function with example usage: test_interpreter(use_iterator) and returns: inputs, unknown