class_docstr: Class to represent a dataset of rays.
  
  Args:
      cameras: scene cameras: PinholeCamera
      min_depth: sampled rays minimal depth from cameras: float
      max_depth: sampled rays maximal depth from cameras: float
      ndc: convert ray parameters to normalized device coordinates: bool
      device: device for ray tensors: Union[str, torch.device]
      dtype: type of ray tensors: torch.dtype
docstr: Gets a dataset item.
  
  Args:
      idxs: An index or group of indices of ray parameter object: Union[int, List[int]]
  
  Return:
      A ray parameter object that includes ray origins, directions, and rgb values at the ray 2d pixel
      coordinates: RayGroup
docstr_tok: ["Gets","a","dataset","item",".","Args",":","idxs",":","An","index","or","group","of","indices","of","ray","parameter","object",":","Union","[","int",",","List","[","int","]","]","Return",":","A","ray","parameter","object","that","includes","ray","origins",",","directions",",","and","rgb","values","at","the","ray","2d","pixel","coordinates",":","RayGroup"]
code: def __getitem__(self, idxs: Union[int, List[int]]) -> RayGroup:
      r"""Gets a dataset item.
  
      Args:
          idxs: An index or group of indices of ray parameter object: Union[int, List[int]]
  
      Return:
          A ray parameter object that includes ray origins, directions, and rgb values at the ray 2d pixel
          coordinates: RayGroup
      """
      if not isinstance(self._ray_sampler, RaySampler):
          raise TypeError(
              "Ray sampler is not initiate yet, please run self.init_ray_dataset() before use it."
          )
  
      origins = self._ray_sampler.origins[idxs]
      directions = self._ray_sampler.directions[idxs]
      if self._imgs is None:
          return origins, directions, None
  
      camerd_ids = self._ray_sampler.camera_ids[idxs]
      points_2d = self._ray_sampler.points_2d[idxs]
      rgbs = None
      imgs_for_ids = [self._imgs[i] for i in camerd_ids]
      rgbs = stack(
          [
              img[:, point2d[1].item(), point2d[0].item()]
              for img, point2d in zip(imgs_for_ids, points_2d)
          ]
      )
      rgbs = rgbs.to(dtype=self._dtype) / 255.0
      return origins, directions, rgbs
  
imports: from typing import TYPE_CHECKING, List, Optional, Sequence, Tuple, Union
  import torch
  from torch.utils.data import BatchSampler, DataLoader, Dataset, RandomSampler, SequentialSampler
  from typing_extensions import TypeGuard
  from kornia.core import Device, Tensor, stack
  from kornia.geometry.camera import PinholeCamera
  from kornia.io import ImageLoadType, load_image
  from kornia.nerf.core import Images, ImageTensors
  from kornia.nerf.samplers import RandomRaySampler, RaySampler, UniformRaySampler
label_desc: Use image node_id 10 for calling the RayDataset obj's underlying member method code with example usage: obj.__getitem__(idxs) and returns: origins,  directions,  rgbs, origins,  directions,  None