class_docstr: Generic image classification dataset created from manual directory.
  
  `ImageFolder` creates a `tf.data.Dataset` reading the original image files.
  
  The data directory should have the following structure:
  
  ```
  path/to/image_dir/
    split_name/  # Ex: 'train'
      label1/  # Ex: 'airplane' or '0015'
        xxx.png
        xxy.png
        xxz.png
      label2/
        xxx.png
        xxy.png
        xxz.png
    split_name/  # Ex: 'test'
      ...
  ```
  
  To use it:
  
  ```
  builder = tfds.ImageFolder('path/to/image_dir/')
  print(builder.info)  # num examples, labels... are automatically calculated
  ds = builder.as_dataset(split='train', shuffle_files=True)
  tfds.show_examples(ds, builder.info)
  ```
class_docstr_tok: ["Generic","image","classification","dataset","created","from","manual","directory",".","`","ImageFolder","`","creates","a","`","tf.data.Dataset","`","reading","the","original","image","files",".","The","data","directory","should","have","the","following","structure",":","``","`","path\/to\/image_dir\/","split_name\/","#","Ex",":","'train'","label1\/","#","Ex",":","'airplane","'","or","'0015'","xxx.png","xxy.png","xxz.png","label2\/","xxx.png","xxy.png","xxz.png","split_name\/","#","Ex",":","'test'","...","``","`","To","use","it",":","``","`","builder","=","tfds.ImageFolder","(","'path\/to\/image_dir\/","'",")","print","(","builder.info",")","#","num","examples",",","labels","...","are","automatically","calculated","ds","=","builder.as_dataset","(","split='train","'",",","shuffle_files=True",")","tfds.show_examples","(","ds",",","builder.info",")","``","`"]
code: def _download_and_prepare(
      self, **kwargs
  ) -> (
      NoReturn
  ):  # pytype: disable=signature-mismatch  # overriding-parameter-count-checks
      raise NotImplementedError(
          "No need to call download_and_prepare function for {}.".format(
              type(self).__name__
          )
      )
  
imports: from __future__ import annotations
  import collections
  import os
  import random
  from typing import Dict, List, NoReturn, Optional, Tuple
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import decode
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core.utils import type_utils
  from tensorflow_datasets.core.utils import version
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 3 for calling the ImageFolder obj's underlying member method code with example usage: obj._download_and_prepare() without return types