code: def knn_point(nsample, xyz, new_xyz):
      """
      Input:
          nsample: max sample number in local region
          xyz: all points, [B, N, C]
          new_xyz: query points, [B, S, C]
      Return:
          group_idx: grouped points index, [B, S, nsample]
      """
      sqrdists = square_distance(new_xyz, xyz)
      _, group_idx = torch.topk(
          sqrdists, nsample, dim=-1, largest=False, sorted=False
      )
      return group_idx
  
imports: from abc import ABC, abstractmethod
  import torch
  import torch.nn
  import torch.nn.functional
  import math
  from .multimodal_encoder.builder import build_vision_tower
  import pdb
  from ferret.constants import IGNORE_INDEX, IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_PATCH_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN
label_desc: Use image node_id 7 for calling a global function with example usage: knn_point(nsample, xyz, new_xyz) and returns: group_idx