class_docstr: The `TrackML Particle Tracking Challenge
  <https://www.kaggle.com/c/trackml-particle-identification>`_ dataset to
  reconstruct particle tracks from 3D points left in the silicon detectors.
  
  Args:
      root (str): Root directory where the dataset should be saved.
      transform (callable, optional): A function/transform that takes in an
          :obj:`torch_geometric.data.Data` object and returns a transformed
          version. The data object will be transformed before every access.
          (default: :obj:`None`)
class_docstr_tok: ["The","`","TrackML","Particle","Tracking","Challenge","<","https",":","\/\/www.kaggle.com\/c\/trackml-particle-identification",">","`","_","dataset","to","reconstruct","particle","tracks","from","3D","points","left","in","the","silicon","detectors",".","Args",":","root","(","str",")",":","Root","directory","where","the","dataset","should","be","saved",".","transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","an",":","obj",":","`","torch_geometric.data.Data","`","object","and","returns","a","transformed","version",".","The","data","object","will","be","transformed","before","every","access",".","(","default",":",":","obj",":","`","None","`",")"]
code: def get(self, i: int) -> TrackingData:
      import pandas as pd
  
      idx = self.events[i]
  
      # Get hit positions.
      hits_path = osp.join(self.raw_dir, f"event{idx}-hits.csv")
      pos = pd.read_csv(
          hits_path, usecols=["x", "y", "z"], dtype=np.float32
      )
      pos = torch.from_numpy(pos.values).div_(1000.0)
  
      # Get hit features.
      cells_path = osp.join(self.raw_dir, f"event{idx}-cells.csv")
      cell = pd.read_csv(cells_path, usecols=["hit_id", "value"])
      hit_id = (
          torch.from_numpy(cell["hit_id"].values).to(torch.long).sub_(1)
      )
      value = torch.from_numpy(cell["value"].values).to(torch.float)
      ones = torch.ones(hit_id.size(0))
      num_cells = scatter(ones, hit_id, 0, pos.size(0), "sum").div_(
          10.0
      )
      value = scatter(value, hit_id, 0, pos.size(0), "sum")
      x = torch.stack([num_cells, value], dim=-1)
  
      # Get ground-truth hit assignments.
      truth_path = osp.join(self.raw_dir, f"event{idx}-truth.csv")
      y = pd.read_csv(
          truth_path, usecols=["hit_id", "particle_id", "weight"]
      )
      hit_id = (
          torch.from_numpy(y["hit_id"].values).to(torch.long).sub_(1)
      )
      particle_id = torch.from_numpy(y["particle_id"].values).to(
          torch.long
      )
      particle_id = particle_id.unique(return_inverse=True)[1].sub_(1)
      weight = torch.from_numpy(y["weight"].values).to(torch.float)
  
      # Sort.
      _, perm = index_sort(particle_id * hit_id.size(0) + hit_id)
      hit_id = hit_id[perm]
      particle_id = particle_id[perm]
      weight = weight[perm]
  
      # Remove invalid particle ids.
      mask = particle_id >= 0
      hit_id = hit_id[mask]
      particle_id = particle_id[mask]
      weight = weight[mask]
  
      y_index = torch.stack([particle_id, hit_id], dim=0)
  
      return TrackingData(
          x=x, pos=pos, y_index=y_index, y_weight=weight
      )
  
file_path: pytorch_geometric/torch_geometric/datasets/particle.py
imports: import glob
  import os.path
  from typing import Any, Callable, List, Optional
  import numpy
  import torch
  from torch_geometric.data import Data, Dataset
  from torch_geometric.utils import index_sort, scatter
label_desc: Use image node_id 5 for calling the TrackMLParticleTrackingDataset obj's underlying member method code with example usage: obj.get(i) and returns: TrackingData