code: def validate_collection_label_fields(
      sample_collection,
      field_names,
      allowed_label_types,
      same_type=False,
  ):
      """Validates that the :class:`fiftyone.core.collections.SampleCollection`
      has fields with the specified :class:`fiftyone.core.labels.Label` types.
  
      Args:
          sample_collection: a
              :class:`fiftyone.core.collections.SampleCollection`
          field_names: a field name or iterable of field names
          allowed_label_types: a :class:`fiftyone.core.labels.Label` type or
              iterable of allowed :class:`fiftyone.core.labels.Label` types
          same_type (False): whether to enforce that all fields have same type.
              This condition is enforced separately for sample- and frame-level
              fields
  
      Raises:
          ValueError if the required conditions are not met
      """
      validate_collection(sample_collection)
  
      if etau.is_str(field_names):
          field_names = [field_names]
  
      if not etau.is_container(allowed_label_types):
          allowed_label_types = [allowed_label_types]
  
      if sample_collection._has_frame_fields():
          sample_fields, frame_fields = fou.split_frame_fields(
              field_names
          )
      else:
          sample_fields = field_names
          frame_fields = []
  
      if frame_fields:
          _validate_fields(
              sample_collection,
              frame_fields,
              allowed_label_types,
              same_type,
              frames=True,
          )
  
      if sample_fields:
          _validate_fields(
              sample_collection,
              sample_fields,
              allowed_label_types,
              same_type,
          )
  
file_path: fiftyone/fiftyone/core/validation.py
imports: import eta.core.utils
  import fiftyone.core.media
  import fiftyone.core.utils
label_desc: Use image node_id 6 for calling a global function with example usage: validate_collection_label_fields(sample_collection, field_names, allowed_label_types, same_type) without return types