code: def generate_coordinate(featmap_sizes, device="cuda"):
      """Generate the coordinate.
  
      Args:
          featmap_sizes (tuple): The feature to be calculated,
              of shape (N, C, W, H).
          device (str): The device where the feature will be put on.
      Returns:
          coord_feat (Tensor): The coordinate feature, of shape (N, 2, W, H).
      """
  
      x_range = torch.linspace(-1, 1, featmap_sizes[-1], device=device)
      y_range = torch.linspace(-1, 1, featmap_sizes[-2], device=device)
      y, x = torch.meshgrid(y_range, x_range)
      y = y.expand([featmap_sizes[0], 1, -1, -1])
      x = x.expand([featmap_sizes[0], 1, -1, -1])
      coord_feat = torch.cat([x, y], 1)
  
      return coord_feat
  
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 11 for calling a global function with example usage: generate_coordinate(featmap_sizes, device) and returns: coord_feat