code: def classifications_to_detections(
      sample_collection, in_field, out_field
  ):
      """Converts the :class:`fiftyone.core.labels.Classifications` field of the
      collection into a :class:`fiftyone.core.labels.Detections` field containing
      detections whose bounding boxes span the entire image with one detection
      for each classification.
  
      Args:
          sample_collection: a
              :class:`fiftyone.core.collections.SampleCollection`
          in_field: the name of the :class:`fiftyone.core.labels.Classifications`
              field
          out_field: the name of the :class:`fiftyone.core.labels.Detections`
              field to populate
      """
      fov.validate_collection_label_fields(
          sample_collection, in_field, fol.Classifications
      )
  
      samples = sample_collection.select_fields(in_field)
      in_field, processing_frames = samples._handle_frame_field(
          in_field
      )
      out_field, _ = samples._handle_frame_field(out_field)
  
      for sample in samples.iter_samples(autosave=True, progress=True):
          if processing_frames:
              images = sample.frames.values()
          else:
              images = [sample]
  
          for image in images:
              detections = []
              classifications = image[in_field]
              if classifications is None:
                  continue
  
              for label in classifications.classifications:
                  if label is None:
                      continue
  
                  detection = fol.Detection(
                      label=label.label,
                      bounding_box=[0, 0, 1, 1],  # entire image
                      confidence=label.confidence,
                  )
                  detections.append(detection)
  
              image[out_field] = fol.Detections(detections=detections)
  
file_path: fiftyone/fiftyone/utils/labels.py
imports: import eta.core.utils
  import fiftyone.core.labels
  import fiftyone.core.utils
  import fiftyone.core.validation
label_desc: Use image node_id 10 for calling a global function with example usage: classifications_to_detections(sample_collection, in_field, out_field) without return types