code: def plot_gt_boxes_3d(sample, shape_pointclouds, figsize=5):
      """Plot."""
      intrinsics = sample["k"].numpy()
      pose_world2camera = sample["rt"].numpy()
  
      _ = plt.figure(figsize=(figsize, figsize))
      plt.clf()
  
      intrinsics = np.reshape(intrinsics, [3, 3])
      pose_world2camera = np.reshape(pose_world2camera, [3, 4])
  
      # Plot ground truth boxes
      # num_boxes = sample['groundtruth_boxes'].shape[0]
      colors = ["r", "g", "b", "c", "m", "y"]
      colors2 = ["r.", "g.", "b."]
      for i in [2, 1, 0]:
          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, :],
              "w.",
              markersize=5,
          )
          plt.plot(
              projected_pointcloud[0, :],
              projected_pointcloud[1, :],
              colors2[i],
              markersize=3,
          )
  
          predicted_pose_obj2world = np.eye(4)
          predicted_pose_obj2world[0:3, 0:3] = tf.reshape(
              sample["rotations_3d"][i], [3, 3]
          ).numpy()
          predicted_pose_obj2world[0:3, 3] = sample["translations_3d"][
              i
          ].numpy()
          draw_bounding_box_3d(
              sample["sizes_3d"][i].numpy(),
              predicted_pose_obj2world,
              intrinsics,
              pose_world2camera,
              linestyle="solid",
              color="w",
              linewidth=3,
          )
          draw_bounding_box_3d(
              sample["sizes_3d"][i].numpy(),
              predicted_pose_obj2world,
              intrinsics,
              pose_world2camera,
              linestyle="solid",
              color=colors[i],
              linewidth=1,
          )
  
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 7 for calling a global function with example usage: plot_gt_boxes_3d(sample, shape_pointclouds, figsize) without return types