class_docstr: `LSUN <http://lsun.cs.princeton.edu>`_ dataset.
  
  Args:
      root (string): Root directory for the database files.
      classes (string or list): One of {'train', 'val', 'test'} or a list of
          categories to load. e.g. ['bedroom_train', 'church_train'].
      transform (callable, optional): A function/transform that  takes in an PIL image
          and returns a transformed version. E.g, ``transforms.RandomCrop``
      target_transform (callable, optional): A function/transform that takes in the
          target and transforms it.
class_docstr_tok: ["`","LSUN","<","http",":","\/\/lsun.cs.princeton.edu",">","`","_","dataset",".","Args",":","root","(","string",")",":","Root","directory","for","the","database","files",".","classes","(","string","or","list",")",":","One","of","{","'train","'",",","'val","'",",","'test","'","}","or","a","list","of","categories","to","load",".","e.g",".","[","'bedroom_train","'",",","'church_train","'","]",".","transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","an","PIL","image","and","returns","a","transformed","version",".","E.g",",","``","transforms.RandomCrop","``","target_transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","the","target","and","transforms","it","."]
docstr: Args:
      index (int): Index
  
  Returns:
      tuple: Tuple (image, target) where target is the index of the target category.
docstr_tok: ["Args",":","index","(","int",")",":","Index","Returns",":","tuple",":","Tuple","(","image",",","target",")","where","target","is","the","index","of","the","target","category","."]
code: def __getitem__(self, index):
      """
      Args:
          index (int): Index
  
      Returns:
          tuple: Tuple (image, target) where target is the index of the target category.
      """
      target = 0
      sub = 0
      for ind in self.indices:
          if index < ind:
              break
          target += 1
          sub = ind
  
      db = self.dbs[target]
      index = index - sub
  
      if self.target_transform is not None:
          target = self.target_transform(target)
  
      img, _ = db[index]
      return img, target
  
imports: from __future__ import absolute_import
  from __future__ import division
  import os
  import numpy
  import mxnet
  from mxnet import gluon
  from PIL import Image
  import sys
label_desc: Use image node_id 2 for calling the LSUN obj's underlying member method code with example usage: obj.__getitem__(index) and returns: img,  target