code: def _uniform_sample_train_points(self, instances):
      assert self.training
      proposal_boxes = [x.proposal_boxes for x in instances]
      cat_boxes = Boxes.cat(proposal_boxes)
      # uniform sample
      point_coords = torch.rand(
          len(cat_boxes),
          self.mask_point_train_num_points,
          2,
          device=cat_boxes.tensor.device,
      )
      # sample point_labels
      point_coords_wrt_image = get_point_coords_wrt_image(
          cat_boxes.tensor, point_coords
      )
      point_labels = sample_point_labels(
          instances, point_coords_wrt_image
      )
      return point_coords, point_labels
  
imports: import logging
  import math
  import numpy
  from typing import Dict, List, Tuple
  import fvcore.nn.weight_init
  import torch
  from torch import Tensor, nn
  from torch.nn import functional
  from detectron2.config import configurable
  from detectron2.layers import Conv2d, ShapeSpec, cat, interpolate
  from detectron2.modeling import ROI_MASK_HEAD_REGISTRY
  from detectron2.modeling.roi_heads.mask_head import mask_rcnn_inference, mask_rcnn_loss
  from detectron2.structures import Boxes
  from .point_features import generate_regular_grid_point_coords, get_point_coords_wrt_image, get_uncertain_point_coords_on_grid, get_uncertain_point_coords_with_randomness, point_sample, point_sample_fine_grained_features, sample_point_labels
  from .point_head import build_point_head, roi_mask_point_loss
label_desc: Use image node_id 5 for calling the ImplicitPointRendMaskHead obj's underlying member method code with example usage: obj._uniform_sample_train_points(instances) and returns: point_coords,  point_labels