class_docstr: Dataset importer that ingests labeled images into the provided
  ``dataset_dir`` during import.
  
  The source images and labels are parsed from the provided ``samples`` using
  the provided :class:`fiftyone.utils.data.parsers.LabeledImageSampleParser`.
  
  If an image path is available via
  :func:`fiftyone.utils.data.parsers.LabeledImageSampleParser.get_image_path`,
  then the image is directly copied from its source location into
  ``dataset_dir``. In this case, the original filename is maintained, unless
  a name conflict would occur, in which case an index of the form
  ``"-%d" % count`` is appended to the base filename.
  
  If no image path is available, the image is read in-memory via
  :func:`fiftyone.utils.data.parsers.LabeledImageSampleParser.get_image` and
  written to ``dataset_dir`` in the following format::
  
      <dataset_dir>/<image_count><image_format>
  
  where ``image_count`` is the number of files in ``dataset_dir``.
  
  Args:
      dataset_dir: the directory where input images will be ingested into
      samples: an iterable of samples that can be parsed by ``sample_parser``
      sample_parser: an
          :class:`fiftyone.utils.data.parsers.LabeledImageSampleParser` to
          use to parse the samples
      image_format (None): the image format to use when writing in-memory
          images to disk. By default, ``fiftyone.config.default_image_ext``
          is used
      max_samples (None): a maximum number of samples to import. By default,
          all samples are imported
class_docstr_tok: ["Dataset","importer","that","ingests","labeled","images","into","the","provided","``","dataset_dir","``","during","import",".","The","source","images","and","labels","are","parsed","from","the","provided","``","samples","``","using","the","provided",":","class",":","`","fiftyone.utils.data.parsers.LabeledImageSampleParser","`",".","If","an","image","path","is","available","via",":","func",":","`","fiftyone.utils.data.parsers.LabeledImageSampleParser.get_image_path","`",",","then","the","image","is","directly","copied","from","its","source","location","into","``","dataset_dir","``",".","In","this","case",",","the","original","filename","is","maintained",",","unless","a","name","conflict","would","occur",",","in","which","case","an","index","of","the","form","``","``","-","%","d","''","%","count","``","is","appended","to","the","base","filename",".","If","no","image","path","is","available",",","the","image","is","read","in-memory","via",":","func",":","`","fiftyone.utils.data.parsers.LabeledImageSampleParser.get_image","`","and","written","to","``","dataset_dir","``","in","the","following","format",":",":","<","dataset_dir",">","\/","<","image_count",">","<","image_format",">","where","``","image_count","``","is","the","number","of","files","in","``","dataset_dir","``",".","Args",":","dataset_dir",":","the","directory","where","input","images","will","be","ingested","into","samples",":","an","iterable","of","samples","that","can","be","parsed","by","``","sample_parser","``","sample_parser",":","an",":","class",":","`","fiftyone.utils.data.parsers.LabeledImageSampleParser","`","to","use","to","parse","the","samples","image_format","(","None",")",":","the","image","format","to","use","when","writing","in-memory","images","to","disk",".","By","default",",","``","fiftyone.config.default_image_ext","``","is","used","max_samples","(","None",")",":","a","maximum","number","of","samples","to","import",".","By","default",",","all","samples","are","imported"]
code: def setup(self):
      self._setup()
  
      try:
          self._num_samples = len(self.samples)
          if self.max_samples is not None:
              self._num_samples = min(
                  self._num_samples, self.max_samples
              )
      except:
          pass
  
imports: import logging
  import eta.core.utils
  import fiftyone
  import fiftyone.core.utils
  import fiftyone.utils.image
  from .importers import UnlabeledImageDatasetImporter, LabeledImageDatasetImporter, UnlabeledVideoDatasetImporter, LabeledVideoDatasetImporter
label_desc: Use image node_id 8 for calling the LabeledImageDatasetIngestor obj's underlying member method code with example usage: obj.setup() without return types