docstr: Confirm that torch.multinomial does not sample elements which have
  zero probability using a real example of input from a training run.
docstr_tok: ["Confirm","that","torch.multinomial","does","not","sample","elements","which","have","zero","probability","using","a","real","example","of","input","from","a","training","run","."]
code: def test_multinomial_weights(self):
      """
      Confirm that torch.multinomial does not sample elements which have
      zero probability using a real example of input from a training run.
      """
      weights = torch.load(get_tests_dir() / "weights.pt")
      S = 4096
      num_trials = 100
      for _ in range(0, num_trials):
          weights[weights < 0] = 0.0
          samples = weights.multinomial(S, replacement=True)
          sampled_weights = weights[samples]
          assert sampled_weights.min() > 0
          if sampled_weights.min() <= 0:
              return False
      return True
  
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 5 for calling the TestSamplePoints obj's underlying member method code with example usage: obj.test_multinomial_weights() and returns: True, False