code: def shift_masks(
      masks: np.ndarray,
      offset: Sequence[int],
      full_shape: Sequence[int],
  ) -> np.ndarray:
      """Shift masks to the original image.
      Args:
          masks (np.ndarray): masks that need to be shifted.
          offset (Sequence[int]): The offset to translate with shape of (2, ).
          full_shape (Sequence[int]): A (height, width) tuple of the huge image's shape.
      Returns:
          np.ndarray: Shifted masks.
      """
      # empty masks
      if masks is None:
          return masks
  
      shifted_masks = []
      for mask in masks:
          mask = Mask(
              bool_mask=mask, shift_amount=offset, full_shape=full_shape
          )
          mask = mask.get_shifted_mask()
          shifted_masks.append(mask.bool_mask)
  
      return np.stack(shifted_masks, axis=0)
  
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 13 for calling a global function with example usage: shift_masks(masks, offset, full_shape) and returns: np, masks