code: def point_sample(input, point_coords, **grid_sample_kwargs):
      add_dim = False
      if point_coords.dim() == 3:
          add_dim = True
          point_coords = point_coords.unsqueeze(2)
      output = F.grid_sample(
          input, 2.0 * point_coords - 1.0, **grid_sample_kwargs
      )
      if add_dim:
          output = output.squeeze(3)
      return output
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from scipy.optimize import linear_sum_assignment
  from paddlepanseg.cvlibs import manager, build_info_dict
  from paddlepanseg.core.runner import PanSegRunner
label_desc: Use image node_id 1 for calling a global function with example usage: point_sample(input, point_coords) and returns: output