class_docstr: Helper class providing useful methods for working with ``SampleCollection`` datasets from FiftyOne.
  
  Args:
      label_field: The field in the ``SampleCollection`` containing the ground truth labels.
      label_cls: The ``FiftyOne.Label`` subclass to expect ground truth labels to be instances of. If ``None``,
          defaults to ``FiftyOne.Label``.
code: def validate(self, sample_collection: SampleCollection):
      label_type = sample_collection._get_label_field_type(
          self.label_field
      )
      if not issubclass(label_type, self.label_cls):
          raise ValueError(
              f"Expected field '{self.label_field}' to have type {self.label_cls}; found {label_type}"
          )
  
file_path: lightning-flash/src/flash/core/integrations/fiftyone/utils.py
imports: from itertools import chain
  from typing import Dict, List, Optional, Type, Union
  import flash
  from flash.core.utilities.imports import _FIFTYONE_AVAILABLE, lazy_import, requires
label_desc: Use image node_id 2 for calling the FiftyOneLabelUtilities obj's underlying member method code with example usage: obj.validate(sample_collection) without return types