class_docstr: Wrapper around S3DISSphere that creates train and test datasets.
  
  http://buildingparser.stanford.edu/dataset.html
  
  Parameters
  ----------
  dataset_opt: omegaconf.DictConfig
      Config dictionary that should contain
  
          - dataroot
          - fold: test_area parameter
          - pre_collate_transform
          - train_transforms
          - test_transforms
class_docstr_tok: ["Wrapper","around","S3DISSphere","that","creates","train","and","test","datasets",".","http",":","\/\/buildingparser.stanford.edu\/dataset.html","Parameters","--","--","--","--","--","dataset_opt",":","omegaconf.DictConfig","Config","dictionary","that","should","contain","-","dataroot","-","fold",":","test_area","parameter","-","pre_collate_transform","-","train_transforms","-","test_transforms"]
code: def __init__(self, dataset_opt):
      super().__init__(dataset_opt)
  
      sampling_format = dataset_opt.get("sampling_format", "sphere")
      dataset_cls = (
          S3DISCylinder
          if sampling_format == "cylinder"
          else S3DISSphere
      )
  
      self.train_dataset = dataset_cls(
          self._data_path,
          sample_per_epoch=3000,
          test_area=self.dataset_opt.fold,
          split="train",
          pre_collate_transform=self.pre_collate_transform,
          transform=self.train_transform,
      )
  
      self.val_dataset = dataset_cls(
          self._data_path,
          sample_per_epoch=-1,
          test_area=self.dataset_opt.fold,
          split="val",
          pre_collate_transform=self.pre_collate_transform,
          transform=self.val_transform,
      )
      self.test_dataset = dataset_cls(
          self._data_path,
          sample_per_epoch=-1,
          test_area=self.dataset_opt.fold,
          split="test",
          pre_collate_transform=self.pre_collate_transform,
          transform=self.test_transform,
      )
  
      if dataset_opt.class_weight_method:
          self.add_weights(
              class_weight_method=dataset_opt.class_weight_method
          )
  
imports: import os
  import os.path
  from itertools import repeat, product
  import numpy
  import h5py
  import torch
  import random
  import glob
  from plyfile import PlyData, PlyElement
  from torch_geometric.data import InMemoryDataset, Data, extract_zip, Dataset
  from torch_geometric.data.dataset import files_exist
  from torch_geometric.data import DataLoader
  from torch_geometric.datasets import S3DIS
  import torch_geometric.transforms
  import logging
  from sklearn.neighbors import NearestNeighbors, KDTree
  from tqdm.auto import tqdm
  import csv
  import pandas
  import pickle
  import gdown
  import shutil
  from torch_points3d.datasets.samplers import BalancedRandomSampler
  import torch_points3d.core.data_transform
  from torch_points3d.datasets.base_dataset import BaseDataset
label_desc: Use image node_id 1 to create a new S3DISFusedDataset object from inherited base classes: BaseDataset with example: obj = S3DISFusedDataset(dataset_opt)