code: def compute_bboxes(
      segmentation: ArrayLike, asset_list: Sequence[core.Asset]
  ):
      for k, asset in enumerate(asset_list, start=1):
          asset.metadata["bboxes"] = []
          asset.metadata["bbox_frames"] = []
          for t in range(segmentation.shape[0]):
              seg = segmentation[t, ..., 0]
              idxs = np.array(np.where(seg == k), dtype=np.float32)
              if idxs.size > 0:
                  y_min = float(idxs[0].min() / seg.shape[0])
                  x_min = float(idxs[1].min() / seg.shape[1])
                  y_max = float((idxs[0].max() + 1) / seg.shape[0])
                  x_max = float((idxs[1].max() + 1) / seg.shape[1])
                  asset.metadata["bboxes"].append(
                      (y_min, x_min, y_max, x_max)
                  )
                  asset.metadata["bbox_frames"].append(t)
  
imports: import numpy
  from typing import Sequence
  from kubric import core
  from kubric.kubric_typing import ArrayLike
label_desc: Use image node_id 3 for calling a global function with example usage: compute_bboxes(segmentation, asset_list) without return types