code: def plot_labeled_2d_boxes(sample, batch_id=0):
      """Plot."""
      image = (
          tf.io.decode_image(sample["image_data"][batch_id]).numpy()
          / 255.0
      )
      image = sample["image"][batch_id].numpy()[..., ::-1]
      image2 = np.reshape(image, [-1, 3])
      image2 -= np.min(image2, axis=0)
      image2 /= np.max(image2, axis=0)
      image = np.reshape(image2, [256, 256, 3])
      sample["detection_boxes"] = sample["groundtruth_boxes"][
          batch_id
      ].numpy()
  
      figure = plt.figure(figsize=(5, 5))
      plt.clf()
      plt.imshow(image)
  
      for i in range(sample["groundtruth_boxes"][batch_id].shape[0]):
          y_min, x_min, y_max, x_max = (
              sample["detection_boxes"][i] * 256.0
          )
          plt.plot(
              [x_min, x_max, x_max, x_min, x_min],
              [y_min, y_min, y_max, y_max, y_min],
              linestyle="dashed",
          )
      return figure
  
imports: import os
  import pickle
  import re
  import matplotlib.pyplot
  import numpy
  import tensorflow
  from tensorflow_graphics.projects.points_to_3Dobjects.utils import tf_utils
  from google3.pyglib import gfile
label_desc: Use image node_id 18 for calling a global function with example usage: plot_labeled_2d_boxes(sample, batch_id) and returns: figure