code: def relative_coordinate_maps(
      locations: Tensor,
      centers: Tensor,
      strides: Tensor,
      size_of_interest: int,
      feat_sizes: Tuple[int],
  ) -> Tensor:
      """Generate the relative coordinate maps with feat_stride.
  
      Args:
          locations (Tensor): The prior location of mask feature map.
              It has shape (num_priors, 2).
          centers (Tensor): The prior points of a object in
              all feature pyramid. It has shape (num_pos, 2)
          strides (Tensor): The prior strides of a object in
              all feature pyramid. It has shape (num_pos, 1)
          size_of_interest (int): The size of the region used in rel coord.
          feat_sizes (Tuple[int]): The feature size H and W, which has 2 dims.
      Returns:
          rel_coord_feat (Tensor): The coordinate feature
              of shape (num_pos, 2, H, W).
      """
  
      H, W = feat_sizes
      rel_coordinates = centers.reshape(-1, 1, 2) - locations.reshape(
          1, -1, 2
      )
      rel_coordinates = rel_coordinates.permute(0, 2, 1).float()
      rel_coordinates = rel_coordinates / (
          strides[:, None, None] * size_of_interest
      )
      return rel_coordinates.reshape(-1, 2, H, W)
  
imports: from functools import partial
  from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmengine.utils import digit_version
  from six.moves import map, zip
  from torch import Tensor
  from torch.autograd import Function
  from torch.nn import functional
  from mmdet.structures import SampleList
  from mmdet.structures.bbox import BaseBoxes, get_box_type, stack_boxes
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
  from mmdet.utils import OptInstanceList
label_desc: Use image node_id 21 for calling a global function with example usage: relative_coordinate_maps(locations, centers, strides, size_of_interest, feat_sizes) and returns: rel_coordinates