code: def plot_bboxes(
      seg, ax=None, linewidth=100, num_objects=None, palette=None
  ):
      import seaborn as sns  # pylint: disable=import-outside-toplevel
      import matplotlib  # pylint: disable=import-outside-toplevel
  
      if ax is None:
          _, ax = get_image_plot(seg.shape[1], seg.shape[0])
      if num_objects is None:
          num_objects = np.max(seg)  # assume consecutive numbering
      num_objects += 1  # background
      if palette is None:
          palette = [(0.0, 0.0, 0.0)] + sns.color_palette(
              "hls", num_objects
          )
      seg = seg[:, :, 0]
      for i in range(1, num_objects):
          idxs = np.array(np.where(seg == i), dtype=np.float32)
          if idxs.size > 0:
              miny, minx, maxy, maxx = (
                  idxs[0].min() - 1,
                  idxs[1].min() - 1,
                  idxs[0].max(),
                  idxs[1].max(),
              )
              rect = matplotlib.patches.Rectangle(
                  [minx, miny],
                  maxx - minx,
                  maxy - miny,
                  linewidth=linewidth,
                  edgecolor=palette[i],
                  facecolor="none",
              )
              ax.add_patch(rect)
  
file_path: kubric/kubric/plotting.py
imports: import colorsys
  import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: plot_bboxes(seg, ax, linewidth, num_objects, palette) without return types