code: def _load_data(self, path):
      self._datas = torch.load(path)
      if not isinstance(self._datas, list):
          self._datas = [self._datas]
      if self._sample_per_epoch > 0:
          self._centres_for_sampling = []
          for i, data in enumerate(self._datas):
              assert not hasattr(
                  data, cT.CylinderSampling.KDTREE_KEY
              )  # Just to make we don't have some out of date data in there
              low_res = self._grid_sphere_sampling(data.clone())
              centres = torch.empty(
                  (low_res.pos.shape[0], 5), dtype=torch.float
              )
              centres[:, :3] = low_res.pos
              centres[:, 3] = i
              centres[:, 4] = low_res.y
              self._centres_for_sampling.append(centres)
              tree = KDTree(np.asarray(data.pos[:, :-1]), leaf_size=10)
              setattr(data, cT.CylinderSampling.KDTREE_KEY, tree)
  
          self._centres_for_sampling = torch.cat(
              self._centres_for_sampling, 0
          )
          uni, uni_counts = np.unique(
              np.asarray(self._centres_for_sampling[:, -1]),
              return_counts=True,
          )
          uni_counts = np.sqrt(uni_counts.mean() / uni_counts)
          self._label_counts = uni_counts / np.sum(uni_counts)
          self._labels = uni
      else:
          grid_sampler = cT.GridCylinderSampling(
              self._radius, self._radius, center=False
          )
          self._test_spheres = grid_sampler(self._datas)
  
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 2 for calling the S3DISCylinder obj's underlying member method code with example usage: obj._load_data(path) without return types