code: def _tflite_convert_verify_num_ops(
      tflite_convert_function, *args, **kwargs
  ):
      """Verifies that the result of the conversion is a single op."""
      num_ops = kwargs.pop("num_ops", 2)
      result = tflite_convert_function(*args, **kwargs)
      tflite_model_binary = result[0]
      if not result[0]:
          tf.compat.v1.logging.error(
              result[1]
          )  # stderr from running tflite_convert.
          raise RuntimeError("Failed to build model: \n\n" + result[1])
      interpreter = tf.lite.Interpreter(
          model_content=tflite_model_binary
      )
      interpreter.allocate_tensors()
      if len(interpreter.get_tensor_details()) != num_ops:
          raise RuntimeError(
              "Expected to generate two node graph got %s "
              % "\n".join(
                  str(x) for x in interpreter.get_tensor_details()
              )
          )
      return result
  
file_path: tensorflow-upstream/tensorflow/lite/testing/op_tests/hardswish.py
imports: import functools
  import numpy
  import tensorflow
  from tensorflow.lite.testing.zip_test_utils import create_tensor_data
  from tensorflow.lite.testing.zip_test_utils import make_zip_of_tests
  from tensorflow.lite.testing.zip_test_utils import register_make_test_function
label_desc: Use image node_id 1 for calling a global function with example usage: _tflite_convert_verify_num_ops(tflite_convert_function) and returns: result