class_docstr: `FlyingThings3D <https://lmb.informatik.uni-freiburg.de/resources/datasets/SceneFlowDatasets.en.html>`_ dataset for optical flow.
  
  The dataset is expected to have the following structure: ::
  
      root
          FlyingThings3D
              frames_cleanpass
                  TEST
                  TRAIN
              frames_finalpass
                  TEST
                  TRAIN
              optical_flow
                  TEST
                  TRAIN
  
  Args:
      root (string): Root directory of the intel FlyingThings3D Dataset.
      split (string, optional): The dataset split, either "train" (default) or "test"
      pass_name (string, optional): The pass to use, either "clean" (default) or "final" or "both". See link above for
          details on the different passes.
      camera (string, optional): Which camera to return images from. Can be either "left" (default) or "right" or "both".
      transforms (callable, optional): A function/transform that takes in
          ``img1, img2, flow, valid_flow_mask`` and returns a transformed version.
          ``valid_flow_mask`` is expected for consistency with other datasets which
          return a built-in valid mask, such as :class:`~torchvision.datasets.KittiFlow`.
class_docstr_tok: ["`","FlyingThings3D","<","https",":","\/\/lmb.informatik.uni-freiburg.de\/resources\/datasets\/SceneFlowDatasets.en.html",">","`","_","dataset","for","optical","flow",".","The","dataset","is","expected","to","have","the","following","structure",":",":",":","root","FlyingThings3D","frames_cleanpass","TEST","TRAIN","frames_finalpass","TEST","TRAIN","optical_flow","TEST","TRAIN","Args",":","root","(","string",")",":","Root","directory","of","the","intel","FlyingThings3D","Dataset",".","split","(","string",",","optional",")",":","The","dataset","split",",","either","``","train","''","(","default",")","or","``","test","''","pass_name","(","string",",","optional",")",":","The","pass","to","use",",","either","``","clean","''","(","default",")","or","``","final","''","or","``","both","''",".","See","link","above","for","details","on","the","different","passes",".","camera","(","string",",","optional",")",":","Which","camera","to","return","images","from",".","Can","be","either","``","left","''","(","default",")","or","``","right","''","or","``","both","''",".","transforms","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","``","img1",",","img2",",","flow",",","valid_flow_mask","``","and","returns","a","transformed","version",".","``","valid_flow_mask","``","is","expected","for","consistency","with","other","datasets","which","return","a","built-in","valid","mask",",","such","as",":","class",":","`","~torchvision.datasets.KittiFlow","`","."]
docstr: Return example at given index.
  
  Args:
      index(int): The index of the example to retrieve
  
  Returns:
      tuple: A 3-tuple with ``(img1, img2, flow)``.
      The flow is a numpy array of shape (2, H, W) and the images are PIL images.
      ``flow`` is None if ``split="test"``.
      If a valid flow mask is generated within the ``transforms`` parameter,
      a 4-tuple with ``(img1, img2, flow, valid_flow_mask)`` is returned.
docstr_tok: ["Return","example","at","given","index",".","Args",":","index","(","int",")",":","The","index","of","the","example","to","retrieve","Returns",":","tuple",":","A","3-tuple","with","``","(","img1",",","img2",",","flow",")","``",".","The","flow","is","a","numpy","array","of","shape","(","2",",","H",",","W",")","and","the","images","are","PIL","images",".","``","flow","``","is","None","if","``","split=","''","test","''","``",".","If","a","valid","flow","mask","is","generated","within","the","``","transforms","``","parameter",",","a","4-tuple","with","``","(","img1",",","img2",",","flow",",","valid_flow_mask",")","``","is","returned","."]
code: def __getitem__(self, index: int) -> Union[T1, T2]:
      """Return example at given index.
  
      Args:
          index(int): The index of the example to retrieve
  
      Returns:
          tuple: A 3-tuple with ``(img1, img2, flow)``.
          The flow is a numpy array of shape (2, H, W) and the images are PIL images.
          ``flow`` is None if ``split="test"``.
          If a valid flow mask is generated within the ``transforms`` parameter,
          a 4-tuple with ``(img1, img2, flow, valid_flow_mask)`` is returned.
      """
      return super().__getitem__(index)
  
imports: import itertools
  import os
  from abc import ABC, abstractmethod
  from glob import glob
  from pathlib import Path
  from typing import Callable, List, Optional, Tuple, Union
  import numpy
  import torch
  from PIL import Image
  from ..io.image import _read_png_16
  from .utils import _read_pfm, verify_str_arg
  from .vision import VisionDataset
label_desc: Use image node_id 2 for calling the FlyingThings3D obj's underlying member method code with example usage: obj.__getitem__(index) and returns: super