code: def plot_gt_boxes_2d(sample, shape_pointclouds, figsize=5):
      """Plot."""
      _ = plt.figure(figsize=(figsize, figsize))
      plt.clf()
      plt.imshow(sample["image"])
  
      # Plot ground truth boxes
      sample["detection_boxes"] = sample["groundtruth_boxes"].numpy()
      colors = ["r.", "g.", "b."]
      for i in range(sample["num_boxes"].numpy()):
          shape_id = sample["shapes"][i]
          pointcloud = tf.transpose(shape_pointclouds[shape_id])
          translation = sample["translations_3d"][i]
          rotation = tf.reshape(sample["rotations_3d"][i], [3, 3])
          size = np.diag(sample["sizes_3d"][i])
  
          trafo_pc = rotation @ size @ (
              pointcloud / 2.0
          ) + tf.expand_dims(translation, 1)
          trafo_pc = tf.concat([trafo_pc, tf.ones([1, 512])], axis=0)
          projected_pointcloud = (
              tf.reshape(sample["k"], [3, 3]) @ sample["rt"] @ trafo_pc
          )
          projected_pointcloud /= projected_pointcloud[2, :]
          plt.plot(
              projected_pointcloud[0, :],
              projected_pointcloud[1, :],
              colors[i % 3],
          )
  
          y_min, x_min, y_max, x_max = sample["detection_boxes"][i]
          y_min *= sample["original_image_spatial_shape"][1].numpy()
          y_max *= sample["original_image_spatial_shape"][1].numpy()
          x_min *= sample["original_image_spatial_shape"][0].numpy()
          x_max *= sample["original_image_spatial_shape"][0].numpy()
          plt.plot(
              [x_min, x_max, x_max, x_min, x_min],
              [y_min, y_min, y_max, y_max, y_min],
              linestyle="dashed",
          )
  
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 5 for calling a global function with example usage: plot_gt_boxes_2d(sample, shape_pointclouds, figsize) without return types