def get_voxel(cloud, center, dimensions, return_mask=False):
    """Get voxel or voxel mask from cloud at given center with specified dimensions"""
    mask = (cloud[:, :3] >= (center-dimensions/2)
            ).all(dim=1) & (cloud[:, :3] <= (center+dimensions/2)).all(dim=1)
    if return_mask:
        return mask
    else:
        return cloud[mask]