docstr: Check sample_points_from_meshes raises an exception if all meshes are
  invalid.
docstr_tok: ["Check","sample_points_from_meshes","raises","an","exception","if","all","meshes","are","invalid","."]
code: def test_all_empty_meshes(self):
      """
      Check sample_points_from_meshes raises an exception if all meshes are
      invalid.
      """
      device = get_random_cuda_device()
      verts1 = torch.tensor([], dtype=torch.float32, device=device)
      faces1 = torch.tensor([], dtype=torch.int64, device=device)
      meshes = Meshes(
          verts=[verts1, verts1, verts1], faces=[faces1, faces1, faces1]
      )
      with self.assertRaises(ValueError) as err:
          sample_points_from_meshes(
              meshes, num_samples=100, return_normals=True
          )
      self.assertTrue("Meshes are empty." in str(err.exception))
  
imports: import unittest
  import numpy
  import torch
  from PIL import Image
  from pytorch3d.io import load_objs_as_meshes
  from pytorch3d.ops import sample_points_from_meshes
  from pytorch3d.renderer import TexturesVertex
  from pytorch3d.renderer.cameras import FoVPerspectiveCameras, look_at_view_transform
  from pytorch3d.renderer.mesh.rasterize_meshes import barycentric_coordinates
  from pytorch3d.renderer.points import NormWeightedCompositor, PointsRasterizationSettings, PointsRasterizer, PointsRenderer
  from pytorch3d.structures import Meshes, Pointclouds
  from pytorch3d.utils.ico_sphere import ico_sphere
  from .common_testing import get_pytorch3d_dir, get_random_cuda_device, get_tests_dir, TestCaseMixin
label_desc: Use image node_id 2 for calling the TestSamplePoints obj's underlying member method code with example usage: obj.test_all_empty_meshes() without return types