class_docstr: `LFW <http://vis-www.cs.umass.edu/lfw/>`_ Dataset.
  
  Args:
      root (string): Root directory of dataset where directory
          ``lfw-py`` exists or will be saved to if download is set to True.
      split (string, optional): The image split to use. Can be one of ``train``, ``test``,
          ``10fold``. Defaults to ``10fold``.
      image_set (str, optional): Type of image funneling to use, ``original``, ``funneled`` or
          ``deepfunneled``. Defaults to ``funneled``.
      transform (callable, optional): A function/transform that takes in a PIL image
          and returns a transformed version. E.g, ``transforms.RandomRotation``
      target_transform (callable, optional): A function/transform that takes in the
          target and transforms it.
      download (bool, optional): If true, downloads the dataset from the internet and
          puts it in root directory. If dataset is already downloaded, it is not
          downloaded again.
class_docstr_tok: ["`","LFW","<","http",":","\/\/vis-www.cs.umass.edu\/lfw\/",">","`","_","Dataset",".","Args",":","root","(","string",")",":","Root","directory","of","dataset","where","directory","``","lfw-py","``","exists","or","will","be","saved","to","if","download","is","set","to","True",".","split","(","string",",","optional",")",":","The","image","split","to","use",".","Can","be","one","of","``","train","``",",","``","test","``",",","``","10fold","``",".","Defaults","to","``","10fold","``",".","image_set","(","str",",","optional",")",":","Type","of","image","funneling","to","use",",","``","original","``",",","``","funneled","``","or","``","deepfunneled","``",".","Defaults","to","``","funneled","``",".","transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","a","PIL","image","and","returns","a","transformed","version",".","E.g",",","``","transforms.RandomRotation","``","target_transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","the","target","and","transforms","it",".","download","(","bool",",","optional",")",":","If","true",",","downloads","the","dataset","from","the","internet","and","puts","it","in","root","directory",".","If","dataset","is","already","downloaded",",","it","is","not","downloaded","again","."]
docstr: Args:
      index (int): Index
  
  Returns:
      tuple: (image1, image2, target) where target is `0` for different indentities and `1` for same identities.
docstr_tok: ["Args",":","index","(","int",")",":","Index","Returns",":","tuple",":","(","image1",",","image2",",","target",")","where","target","is","`","0","`","for","different","indentities","and","`","1","`","for","same","identities","."]
code: def __getitem__(self, index: int) -> Tuple[Any, Any, int]:
      """
      Args:
          index (int): Index
  
      Returns:
          tuple: (image1, image2, target) where target is `0` for different indentities and `1` for same identities.
      """
      img1, img2 = self.data[index]
      img1, img2 = self._loader(img1), self._loader(img2)
      target = self.targets[index]
  
      if self.transform is not None:
          img1, img2 = self.transform(img1), self.transform(img2)
  
      if self.target_transform is not None:
          target = self.target_transform(target)
  
      return img1, img2, target
  
imports: import os
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  from PIL import Image
  from .utils import check_integrity, download_and_extract_archive, download_url, verify_str_arg
  from .vision import VisionDataset
label_desc: Use image node_id 3 for calling the LFWPairs obj's underlying member method code with example usage: obj.__getitem__(index) and returns: img1,  img2,  target