code: def test_simple_random_clouds(self):
      # Define the test object either from lists or tensors.
      for with_normals in (False, True):
          for with_features in (False, True):
              for lists_to_tensors in (False, True):
                  N = 10
                  cloud = self.init_cloud(
                      N,
                      lists_to_tensors=lists_to_tensors,
                      with_normals=with_normals,
                      with_features=with_features,
                  )
                  points_list = cloud.points_list()
                  normals_list = cloud.normals_list()
                  features_list = cloud.features_list()
  
                  # Check batch calculations.
                  points_padded = cloud.points_padded()
                  normals_padded = cloud.normals_padded()
                  features_padded = cloud.features_padded()
                  points_per_cloud = cloud.num_points_per_cloud()
  
                  if not with_normals:
                      self.assertIsNone(normals_list)
                      self.assertIsNone(normals_padded)
                  if not with_features:
                      self.assertIsNone(features_list)
                      self.assertIsNone(features_padded)
                  for n in range(N):
                      p = points_list[n].shape[0]
                      self.assertClose(
                          points_padded[n, :p, :], points_list[n]
                      )
                      if with_normals:
                          norms = normals_list[n].shape[0]
                          self.assertEqual(p, norms)
                          self.assertClose(
                              normals_padded[n, :p, :], normals_list[n]
                          )
                      if with_features:
                          f = features_list[n].shape[0]
                          self.assertEqual(p, f)
                          self.assertClose(
                              features_padded[n, :p, :],
                              features_list[n],
                          )
                      if points_padded.shape[1] > p:
                          self.assertTrue(
                              points_padded[n, p:, :].eq(0).all()
                          )
                          if with_features:
                              self.assertTrue(
                                  features_padded[n, p:, :].eq(0).all()
                              )
                      self.assertEqual(points_per_cloud[n], p)
  
                  # Check compute packed.
                  points_packed = cloud.points_packed()
                  packed_to_cloud = cloud.packed_to_cloud_idx()
                  cloud_to_packed = cloud.cloud_to_packed_first_idx()
                  normals_packed = cloud.normals_packed()
                  features_packed = cloud.features_packed()
                  if not with_normals:
                      self.assertIsNone(normals_packed)
                  if not with_features:
                      self.assertIsNone(features_packed)
  
                  cur = 0
                  for n in range(N):
                      p = points_list[n].shape[0]
                      self.assertClose(
                          points_packed[cur : cur + p, :],
                          points_list[n],
                      )
                      if with_normals:
                          self.assertClose(
                              normals_packed[cur : cur + p, :],
                              normals_list[n],
                          )
                      if with_features:
                          self.assertClose(
                              features_packed[cur : cur + p, :],
                              features_list[n],
                          )
                      self.assertTrue(
                          packed_to_cloud[cur : cur + p].eq(n).all()
                      )
                      self.assertTrue(cloud_to_packed[n] == cur)
                      cur += p
  
imports: import itertools
  import random
  import unittest
  import numpy
  import torch
  from pytorch3d.structures import utils
  from pytorch3d.structures.pointclouds import join_pointclouds_as_batch, join_pointclouds_as_scene, Pointclouds
  from .common_testing import TestCaseMixin
label_desc: Use image node_id 6 for calling the TestPointclouds obj's underlying member method code with example usage: obj.test_simple_random_clouds() without return types