code: def build_bbox_tensors(infos, max_length):
      num_bbox = min(max_length, len(infos))
  
      # After num_bbox, everything else should be zero
      coord_tensor = torch.zeros((max_length, 4), dtype=torch.float)
      width_tensor = torch.zeros(max_length, dtype=torch.float)
      height_tensor = torch.zeros(max_length, dtype=torch.float)
      bbox_types = ["xyxy"] * max_length
  
      infos = infos[:num_bbox]
      sample = Sample()
  
      for idx, info in enumerate(infos):
          bbox = info["bounding_box"]
          x = bbox.get("top_left_x", bbox["topLeftX"])
          y = bbox.get("top_left_y", bbox["topLeftY"])
          width = bbox["width"]
          height = bbox["height"]
  
          coord_tensor[idx][0] = x
          coord_tensor[idx][1] = y
          coord_tensor[idx][2] = x + width
          coord_tensor[idx][3] = y + height
  
          width_tensor[idx] = width
          height_tensor[idx] = height
      sample.coordinates = coord_tensor
      sample.width = width_tensor
      sample.height = height_tensor
      sample.bbox_types = bbox_types
  
      return sample
  
imports: import warnings
  from typing import List
  import torch
  from mmf.common.sample import Sample
  from omegaconf import DictConfig
label_desc: Use image node_id 1 for calling a global function with example usage: build_bbox_tensors(infos, max_length) and returns: sample