code: def test_pn2(self):
      from torch_points3d.applications.pointnet2 import PointNet2
  
      input_nc = 2
      num_layers = 3
      output_nc = 5
      model = PointNet2(
          architecture="unet",
          input_nc=input_nc,
          output_nc=output_nc,
          num_layers=num_layers,
          multiscale=True,
          config=None,
      )
      dataset = MockDataset(input_nc, num_points=512)
      self.assertEqual(
          len(model._modules["down_modules"]), num_layers - 1
      )
      self.assertEqual(len(model._modules["inner_modules"]), 1)
      self.assertEqual(len(model._modules["up_modules"]), num_layers)
  
      try:
          data_out = model.forward(dataset[0])
          self.assertEqual(data_out.x.shape[1], output_nc)
      except Exception as e:
          print("Model failing:")
          print(model)
          raise e
  
imports: from torch_points3d.datasets.object_detection.scannet import ScannetDataset
  from torch_points3d.core.data_transform import GridSampling3D
  from torch_points3d.applications.pretrained_api import PretainedRegistry
  from test.mockdatasets import MockDatasetGeometric, MockDataset
  import os
  import sys
  import unittest
  import torch
  from omegaconf import OmegaConf
label_desc: Use image node_id 2 for calling the TestAPIUnet obj's underlying member method code with example usage: obj.test_pn2() without return types