code: def subsample(self, rate, random=False):
          
          if type(rate) != int and rate < 1:
              raise ValueError('Can only subsample with strictly positive integer rate')
          indices = np.arange(self.num_points)
          if random:
              np.random.shuffle(indices)
          subsample_inds = indices[::rate]
          subsampled_data = self._data[:,subsample_inds]
          return PointCloud(subsampled_data, self._frame), subsample_inds
docs: Returns a subsampled version of the PointCloud.
  
          Parameters
          ----------
          rate : int
              Only every rate-th element of the PointCloud is returned.
  
          Returns
          -------
          :obj:`PointCloud`
              A subsampled point cloud with N / rate total samples.
  
          Raises
          ------
          ValueError
              If rate is not a positive integer.