code: def testGraphDefBasic(self):
      with ops.Graph().as_default():
          in_tensor = array_ops.placeholder(
              shape=[1, 16, 16, 3], dtype=dtypes.float32, name="input"
          )
          _ = in_tensor + in_tensor
          sess = session.Session()
  
      tflite_model = convert.convert_graphdef_with_arrays(
          sess.graph_def,
          input_arrays_with_shape=[("input", [1, 16, 16, 3])],
          output_arrays=["add"],
          control_output_arrays=None,
          inference_type=dtypes.float32,
          enable_mlir_converter=False,
      )
      self.assertTrue(tflite_model)
  
      # Check values from converted model.
      interpreter = Interpreter(model_content=tflite_model)
      interpreter.allocate_tensors()
  
      input_details = interpreter.get_input_details()
      self.assertEqual(1, len(input_details))
      self.assertEqual("input", input_details[0]["name"])
      self.assertEqual(np.float32, input_details[0]["dtype"])
      self.assertTrue(([1, 16, 16, 3] == input_details[0]["shape"]).all())  # type: ignore
      self.assertEqual((0.0, 0.0), input_details[0]["quantization"])
  
      output_details = interpreter.get_output_details()
      self.assertEqual(1, len(output_details))
      self.assertEqual("add", output_details[0]["name"])
      self.assertEqual(np.float32, output_details[0]["dtype"])
      self.assertTrue(([1, 16, 16, 3] == output_details[0]["shape"]).all())  # type: ignore
      self.assertEqual((0.0, 0.0), output_details[0]["quantization"])
  
imports: from unittest import mock
  import numpy
  from tensorflow.lite.python import convert
  from tensorflow.lite.python import op_hint
  from tensorflow.lite.python.interpreter import Interpreter
  from tensorflow.lite.python.metrics import converter_error_data_pb2
  from tensorflow.lite.python.metrics.wrapper import metrics_wrapper
  from tensorflow.lite.toco import toco_flags_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework.graph_util_impl import _bfs_for_reachable_nodes
  from tensorflow.python.framework.graph_util_impl import _extract_graph_summary
  from tensorflow.python.framework.graph_util_impl import _node_name
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the ConvertTest obj's underlying member method code with example usage: obj.testGraphDefBasic() without return types