code: def image_boxes(
      tag,
      tensor_image,
      tensor_boxes,
      rescale=1,
      dataformats="CHW",
      labels=None,
  ):
      """Outputs a `Summary` protocol buffer with images."""
      tensor_image = make_np(tensor_image)
      tensor_image = convert_to_HWC(tensor_image, dataformats)
      tensor_boxes = make_np(tensor_boxes)
  
      if tensor_image.dtype != np.uint8:
          tensor_image = (tensor_image * 255.0).astype(np.uint8)
  
      image = make_image(
          tensor_image,
          rescale=rescale,
          rois=tensor_boxes,
          labels=labels,
      )
      return Summary(value=[Summary.Value(tag=tag, image=image)])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  import numpy
  import os
  import re
  from .proto.summary_pb2 import Summary
  from .proto.summary_pb2 import HistogramProto
  from .proto.summary_pb2 import SummaryMetadata
  from .proto.tensor_pb2 import TensorProto
  from .proto.tensor_shape_pb2 import TensorShapeProto
  from .proto.plugin_pr_curve_pb2 import PrCurvePluginData
  from .proto.plugin_text_pb2 import TextPluginData
  from .proto.plugin_mesh_pb2 import MeshPluginData
  from .proto import layout_pb2
  from .x2num import make_np
  from .utils import _prepare_video, convert_to_HWC, convert_to_NTCHW
label_desc: Use image node_id 9 for calling a global function with example usage: image_boxes(tag, tensor_image, tensor_boxes, rescale, dataformats, labels) and returns: Summary