code: def test_operations_distribution_generic():
      tflite = pytest.importorskip("tflite")
      tensorflow = pytest.importorskip("tensorflow")
  
      import tensorflow as tf
  
      inp = (224, 224, 9)
      input_shape = (1, *inp)
      kernel_shape = (3, 3)
      padding = (1, 1, 1, 1)
      padding_out = (1, 33, 33, 1)
      dilations_out = 32
  
      @tf.function
      def simple_net(x):
          weight_shape = [
              kernel_shape[0],
              kernel_shape[1],
              input_shape[3],
              3,
          ]
          weights = tf.constant(
              np.random.uniform(size=weight_shape), dtype=tf.float32
          )
          op = tf.nn.conv2d(
              x,
              filters=weights,
              strides=1,
              padding="SAME",
              data_format="NHWC",
              dilations=dilations_out,
          )
          op = tf.pad(
              op,
              [
                  [0, 0],
                  [padding[0], padding_out[2]],
                  [padding[1], padding[3]],
                  [0, 0],
              ],
              "CONSTANT",
          )
          op = tf.pad(
              op,
              [
                  [0, 0],
                  [padding[0], padding_out[2]],
                  [padding[1], padding[3]],
                  [0, 0],
              ],
              "CONSTANT",
          )
          return tf.pad(
              op,
              [
                  [0, 0],
                  [padding[0], padding_out[2]],
                  [padding[1], padding[3]],
                  [0, 0],
              ],
              "CONSTANT",
          )
  
      _, tflite_graph = get_tflite_graph(simple_net, [input_shape])
  
      # Get TFLite model from buffer
      try:
          import tflite
  
          tflite_model = tflite.Model.GetRootAsModel(tflite_graph, 0)
      except AttributeError:
          import tflite.Model
  
          tflite_model = tflite.Model.Model.GetRootAsModel(
              tflite_graph, 0
          )
  
      mod, params = relay.frontend.from_tflite(tflite_model)
  
      mod = tag_suffixes(mod)
      mod = partition_for_ethosu(mod, params)
      operations_distribution = analyze_operations_distribution(mod)
  
      expected = {
          "Identity": ["generic", "generic"],
          "Pad_1": ["generic", "generic"],
          "Pad": ["generic", "generic"],
          "Conv2D2": ["generic", "generic"],
      }
  
      assert operations_distribution == expected
  
file_path: tvm/tests/python/contrib/test_ethosu/test_pass_operations_distribution.py
imports: import pytest
  import numpy
  import tvm
  from tvm import relay
  from tests.python.contrib.test_ethosu.infra import get_tflite_graph
  from tvm.relay.op.contrib.ethosu import partition_for_ethosu
  from tvm.relay.analysis.operations_distribution import analyze_operations_distribution
  from tvm.relay.transform.suffixes import tag_suffixes
label_desc: Use image node_id 2 for calling a global function with example usage: test_operations_distribution_generic() and returns: tf