code: def testL2LossOp(self, tf_quantization_mode):
      root = autotrackable.AutoTrackable()
      root.l2_loss_func = def_function.function(
          lambda x: nn_ops.l2_loss(x)
      )  # pylint: disable=unnecessary-lambda
      input_data = tf.range(4, dtype=tf.float32)
      concrete_func = root.l2_loss_func.get_concrete_function(
          input_data
      )
  
      converter = lite.TFLiteConverterV2.from_concrete_functions(
          [concrete_func], root
      )
      converter._experimental_tf_quantization_mode = (
          tf_quantization_mode
      )
      tflite_model = converter.convert()
      self.assertTrue(tflite_model)
      self.assertIn(
          "FlexL2Loss", tflite_test_util.get_ops_list(tflite_model)
      )
  
      # Check the model works.
      interpreter = Interpreter(model_content=tflite_model)
      interpreter.allocate_tensors()
      input_details = interpreter.get_input_details()
      test_input = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float32)
      interpreter.set_tensor(input_details[0]["index"], test_input)
      interpreter.invoke()
  
      output_details = interpreter.get_output_details()
      expected_output = np.array([15.0], dtype=np.float32)
      output_data = interpreter.get_tensor(output_details[0]["index"])
      self.assertTrue((expected_output == output_data).all())
  
imports: import os
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow.core.framework import graph_pb2
  from tensorflow.lite.python import lite
  from tensorflow.lite.python import test_util
  from tensorflow.lite.python.convert import register_custom_opdefs
  from tensorflow.lite.python.interpreter import Interpreter
  from tensorflow.lite.python.testdata import double_op
  from tensorflow.python.client import session
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework.importer import import_graph_def
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import list_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import saved_model
  from tensorflow.python.trackable import autotrackable
label_desc: Use image node_id 2 for calling the TFQuantizationTest obj's underlying member method code with example usage: obj.testL2LossOp(tf_quantization_mode) without return types