code: def volume_rectangular(extents,
                         count,
                         transform=None):
      
      samples = np.random.random((count, 3)) - .5
      samples *= extents
      if transform is not None:
          samples = transformations.transform_points(samples,
                                                     transform)
      return samples
docs: Return random samples inside a rectangular volume.
  
      Parameters
      ----------
      extents:   (3,) float, side lengths of rectangular solid
      count:     int, number of points to return
      transform: (4,4) float, transformation matrix
  
      Returns
      ---------
      samples: (count, 3) float, points in volume