code: def shift_bboxes(bboxes, offset: Sequence[int]):
      """
      Shift bboxes w.r.t offset.
  
      Suppo
  
      Args:
          bboxes (Tensor, np.ndarray, list): The bboxes need to be translated. Its shape can
              be (n, 4), which means (x, y, x, y).
          offset (Sequence[int]): The translation offsets with shape of (2, ).
      Returns:
          Tensor, np.ndarray, list: Shifted bboxes.
      """
      shifted_bboxes = []
  
      if type(bboxes).__module__ == "torch":
          bboxes_is_torch_tensor = True
      else:
          bboxes_is_torch_tensor = False
  
      for bbox in bboxes:
          if bboxes_is_torch_tensor or isinstance(bbox, np.ndarray):
              bbox = bbox.tolist()
          bbox = BoundingBox(bbox, shift_amount=offset)
          bbox = bbox.get_shifted_box()
          shifted_bboxes.append(bbox.to_xyxy())
  
      if isinstance(bboxes, np.ndarray):
          return np.stack(shifted_bboxes, axis=0)
      elif bboxes_is_torch_tensor:
          return bboxes.new_tensor(shifted_bboxes)
      else:
          return shifted_bboxes
  
imports: import concurrent.futures
  import logging
  import os
  import time
  from pathlib import Path
  from typing import Dict, List, Optional, Sequence, Tuple, Union
  import numpy
  from PIL import Image
  from shapely.errors import TopologicalError
  from tqdm import tqdm
  from sahi.annotation import BoundingBox, Mask
  from sahi.utils.coco import Coco, CocoAnnotation, CocoImage, create_coco_dict
  from sahi.utils.cv import IMAGE_EXTENSIONS_LOSSLESS, IMAGE_EXTENSIONS_LOSSY, read_image_as_pil
  from sahi.utils.file import load_json, save_json
label_desc: Use image node_id 12 for calling a global function with example usage: shift_bboxes(bboxes, offset) and returns: np, bboxes, shifted_bboxes