code: def _mock_wrapped_toco_convert(
      unused_model_flags_str="",
      conversion_flags_str="",
      unused_input_data_str="",
      unused_debug_info_str="",
      unused_enable_mlir_converter=True,
  ):
      # Simulate the converter throwing and error when
      # `guarantee_all_funcs_one_use` is not set.
      if not _conversion_flags_pb2.TocoFlags.FromString(
          conversion_flags_str
      ).guarantee_all_funcs_one_use:
          raise Exception()
      else:
          return bytes("A model", encoding="utf-8")
  
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 1 for calling a global function with example usage: _mock_wrapped_toco_convert(unused_model_flags_str, conversion_flags_str, unused_input_data_str, unused_debug_info_str, unused_enable_mlir_converter) and returns: bytes