code: def test_gather_props(self):
      N = 4
      x = torch.randn((N, 3, 4))
      y = torch.randn((N, 5))
      test_class = TensorPropertiesTestClass(x=x, y=y)
  
      S = 15
      idx = torch.tensor(np.random.choice(N, S))
      test_class_gathered = test_class.gather_props(idx)
  
      self.assertTrue(test_class_gathered.x.shape == (S, 3, 4))
      self.assertTrue(test_class_gathered.y.shape == (S, 5))
  
      for i in range(N):
          inds = idx == i
          if inds.sum() > 0:
              # Check the gathered points in the output have the same value from
              # the input.
              self.assertClose(
                  test_class_gathered.x[inds].mean(dim=0), x[i, ...]
              )
              self.assertClose(
                  test_class_gathered.y[inds].mean(dim=0), y[i, ...]
              )
  
imports: import unittest
  import numpy
  import torch
  from pytorch3d.common.compat import meshgrid_ij
  from pytorch3d.ops import eyes
  from pytorch3d.renderer import AlphaCompositor, PerspectiveCameras, PointsRasterizationSettings, PointsRasterizer, PointsRenderer
  from pytorch3d.renderer.utils import ndc_grid_sample, ndc_to_grid_sample_coords, TensorProperties
  from pytorch3d.structures import Pointclouds
  from .common_testing import TestCaseMixin
label_desc: Use image node_id 6 for calling the TestTensorProperties obj's underlying member method code with example usage: obj.test_gather_props() without return types