class_docstr: Class representing a VOC annotations file.
  
  Args:
      path (None): the path to the image
      folder (None): the name of the folder containing the image
      filename (None): the image filename
      segmented (None): whether the objects are segmented
      metadata (None): a :class:`fiftyone.core.metadata.ImageMetadata`
          instance
      objects (None): a list of :class:`VOCObject` instances
class_docstr_tok: ["Class","representing","a","VOC","annotations","file",".","Args",":","path","(","None",")",":","the","path","to","the","image","folder","(","None",")",":","the","name","of","the","folder","containing","the","image","filename","(","None",")",":","the","image","filename","segmented","(","None",")",":","whether","the","objects","are","segmented","metadata","(","None",")",":","a",":","class",":","`","fiftyone.core.metadata.ImageMetadata","`","instance","objects","(","None",")",":","a","list","of",":","class",":","`","VOCObject","`","instances"]
docstr: Creates a :class:`VOCAnnotation` instance for the given labeled
  image data.
  
  Args:
      metadata: a :class:`fiftyone.core.metadata.ImageMetadata` instance
          for the image
      detections: a :class:`fiftyone.core.labels.Detections`
      path (None): the absolute path to the image
      filename (None): the filename of the image
      extra_attrs (True): whether to include extra object attributes.
          Supported values are:
  
          -   ``True``: include all extra attributes found
          -   ``False``: do not include extra attributes
          -   a name or list of names of specific attributes to include
  
  Returns:
      a :class:`VOCAnnotation`
docstr_tok: ["Creates","a",":","class",":","`","VOCAnnotation","`","instance","for","the","given","labeled","image","data",".","Args",":","metadata",":","a",":","class",":","`","fiftyone.core.metadata.ImageMetadata","`","instance","for","the","image","detections",":","a",":","class",":","`","fiftyone.core.labels.Detections","`","path","(","None",")",":","the","absolute","path","to","the","image","filename","(","None",")",":","the","filename","of","the","image","extra_attrs","(","True",")",":","whether","to","include","extra","object","attributes",".","Supported","values","are",":","-","``","True","``",":","include","all","extra","attributes","found","-","``","False","``",":","do","not","include","extra","attributes","-","a","name","or","list","of","names","of","specific","attributes","to","include","Returns",":","a",":","class",":","`","VOCAnnotation","`"]
code: def from_labeled_image(
      cls,
      metadata,
      detections,
      path=None,
      filename=None,
      extra_attrs=True,
  ):
      """Creates a :class:`VOCAnnotation` instance for the given labeled
      image data.
  
      Args:
          metadata: a :class:`fiftyone.core.metadata.ImageMetadata` instance
              for the image
          detections: a :class:`fiftyone.core.labels.Detections`
          path (None): the absolute path to the image
          filename (None): the filename of the image
          extra_attrs (True): whether to include extra object attributes.
              Supported values are:
  
              -   ``True``: include all extra attributes found
              -   ``False``: do not include extra attributes
              -   a name or list of names of specific attributes to include
  
      Returns:
          a :class:`VOCAnnotation`
      """
      objects = []
      for detection in detections.detections:
          obj = VOCObject.from_detection(
              detection, metadata, extra_attrs=extra_attrs
          )
          objects.append(obj)
  
      return cls(
          path=path,
          filename=filename,
          metadata=metadata,
          objects=objects,
      )
  
imports: import logging
  import os
  import jinja2
  import eta.core.utils
  import fiftyone.constants
  import fiftyone.core.labels
  import fiftyone.core.metadata
  import fiftyone.core.storage
  import fiftyone.core.utils
  import fiftyone.utils.data
label_desc: Use image node_id 3 for calling the VOCAnnotation obj's underlying member method code with example usage: obj.from_labeled_image(cls, metadata, detections, path, filename, extra_attrs) and returns: cls