code: def _convert_to_relay(
      tflite_model_buf,
      input_data,
      input_node,
  ):
      """Converts TFLite model to Relay module and params"""
  
      def convert_to_list(x):
          if not isinstance(x, list):
              x = [x]
          return x
  
      # TFLite.Model.Model has changed to TFLite.Model from 1.14 to 2.1
      try:
          import tflite.Model
  
          tflite_model = tflite.Model.Model.GetRootAsModel(
              tflite_model_buf, 0
          )
      except AttributeError:
          import tflite
  
          tflite_model = tflite.Model.GetRootAsModel(
              tflite_model_buf, 0
          )
      except ImportError:
          raise ImportError("The tflite package must be installed")
  
      input_data = convert_to_list(input_data)
      input_node = convert_to_list(input_node)
  
      shape_dict = {}
      dtype_dict = {}
      for i, name in enumerate(input_node):
          shape_dict[name] = input_data[i].shape
          dtype_dict[name] = input_data[i].dtype.name
  
      mod, params = relay.frontend.from_tflite(
          tflite_model, shape_dict=shape_dict, dtype_dict=dtype_dict
      )
  
      return mod, params
  
file_path: tvm/tests/python/contrib/test_cmsisnn/test_networks.py
imports: import pytest
  import numpy
  import tvm.testing
  from tvm import relay
  from tvm.contrib.download import download_testdata
  from tvm.relay.op.contrib import cmsisnn
  from tvm.testing.aot import AOTTestModel, get_dtype_range, compile_and_run, generate_ref_data
  from tvm.micro.testing.aot_test_utils import AOT_CORSTONE300_RUNNER, AOT_USMP_CORSTONE300_RUNNER
  from .utils import skip_if_no_reference_system
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_to_relay(tflite_model_buf, input_data, input_node) and returns: mod,  params, x