code: def _run(
      self,
      flags_str,
      should_succeed,
      expected_ops_in_converted_model=None,
      expected_output_shapes=None,
  ):
      output_file = os.path.join(self.get_temp_dir(), "model.tflite")
      tflite_bin = resource_loader.get_path_to_datafile(
          "tflite_convert"
      )
      cmdline = "{0} --output_file={1} {2}".format(
          tflite_bin, output_file, flags_str
      )
  
      exitcode = os.system(cmdline)
      if exitcode == 0:
          with gfile.Open(output_file, "rb") as model_file:
              content = model_file.read()
          self.assertEqual(content is not None, should_succeed)
          if expected_ops_in_converted_model:
              op_set = tflite_test_util.get_ops_list(content)
              for opname in expected_ops_in_converted_model:
                  self.assertIn(opname, op_set)
          if expected_output_shapes:
              output_shapes = tflite_test_util.get_output_shapes(
                  content
              )
              self.assertEqual(output_shapes, expected_output_shapes)
          os.remove(output_file)
      else:
          self.assertFalse(should_succeed)
  
imports: import os
  from absl.testing import parameterized
  import numpy
  from tensorflow import keras
  from tensorflow.core.framework import graph_pb2
  from tensorflow.lite.python import test_util
  from tensorflow.lite.python import tflite_convert
  from tensorflow.lite.python.convert import register_custom_opdefs
  from tensorflow.python import tf2
  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 random_ops
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import resource_loader
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import saved_model
  from tensorflow.python.saved_model.save import save
  from tensorflow.python.trackable import autotrackable
  from tensorflow.python.training.training_util import write_graph
label_desc: Use image node_id 2 for calling the TestModels obj's underlying member method code with example usage: obj._run(flags_str, should_succeed, expected_ops_in_converted_model, expected_output_shapes) without return types