code: def get_reference_points(spatial_shapes):
      reference_points_list = []
      for _, (H_, W_) in enumerate(spatial_shapes):
          ref_y, ref_x = paddle.meshgrid(
              paddle.linspace(0.5, H_ - 0.5, H_, dtype="float32"),
              paddle.linspace(0.5, W_ - 0.5, W_, dtype="float32"),
          )
          ref_y = ref_y.reshape([1, -1]) / H_
          ref_x = ref_x.reshape([1, -1]) / W_
          ref = paddle.stack((ref_x, ref_y), -1)
          reference_points_list.append(ref)
      reference_points = paddle.concat(reference_points_list, 1)
      reference_points = paddle.unsqueeze(reference_points, axis=2)
      return reference_points
  
imports: import math
  import warnings
  from functools import partial
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.models.backbones.transformer_utils import DropPath
  from paddleseg.models.layers.ms_deformable_attention import MSDeformAttn
label_desc: Use image node_id 1 for calling a global function with example usage: get_reference_points(spatial_shapes) and returns: reference_points