class_docstr: A :class:`fiftyone.core.view.DatasetView` of frames from a video
  :class:`fiftyone.core.dataset.Dataset`.
  
  Frames views contain an ordered collection of frames, each of which
  corresponds to a single frame of a video from the source collection.
  
  Frames retrieved from frames views are returned as :class:`FrameView`
  objects.
  
  Args:
      source_collection: the
          :class:`fiftyone.core.collections.SampleCollection` from which this
          view was created
      frames_stage: the :class:`fiftyone.core.stages.ToFrames` stage that
          defines how the frames were created
      frames_dataset: the :class:`fiftyone.core.dataset.Dataset` that serves
          the frames in this view
class_docstr_tok: ["A",":","class",":","`","fiftyone.core.view.DatasetView","`","of","frames","from","a","video",":","class",":","`","fiftyone.core.dataset.Dataset","`",".","Frames","views","contain","an","ordered","collection","of","frames",",","each","of","which","corresponds","to","a","single","frame","of","a","video","from","the","source","collection",".","Frames","retrieved","from","frames","views","are","returned","as",":","class",":","`","FrameView","`","objects",".","Args",":","source_collection",":","the",":","class",":","`","fiftyone.core.collections.SampleCollection","`","from","which","this","view","was","created","frames_stage",":","the",":","class",":","`","fiftyone.core.stages.ToFrames","`","stage","that","defines","how","the","frames","were","created","frames_dataset",":","the",":","class",":","`","fiftyone.core.dataset.Dataset","`","that","serves","the","frames","in","this","view"]
code: def _sync_source_schema(self, fields=None, delete=False):
      if delete:
          schema = self.get_field_schema()
      else:
          schema = self._frames_dataset.get_field_schema()
  
      src_schema = self._source_collection.get_frame_field_schema()
      dst_dataset = self._source_collection._root_dataset
  
      add_fields = []
      del_fields = []
  
      if fields is not None:
          # We're syncing specific fields; if they are not present in source
          # collection, add them
  
          for field_name in fields:
              if field_name not in src_schema:
                  add_fields.append(field_name)
      else:
          # We're syncing all fields; add any missing fields to source
          # collection and, if requested, delete any source fields that
          # aren't in this view
  
          default_fields = set(
              self._get_default_sample_fields(include_private=True)
          )
  
          for field_name in schema.keys():
              if (
                  field_name not in src_schema
                  and field_name not in default_fields
              ):
                  add_fields.append(field_name)
  
          if delete:
              for field_name in src_schema.keys():
                  if field_name not in schema:
                      del_fields.append(field_name)
  
      for field_name in add_fields:
          field_kwargs = foo.get_field_kwargs(schema[field_name])
          dst_dataset.add_frame_field(field_name, **field_kwargs)
  
      if delete:
          for field_name in del_fields:
              dst_dataset.delete_frame_field(field_name)
  
imports: from collections import defaultdict
  from copy import deepcopy
  import logging
  import os
  from bson import ObjectId
  from pymongo import UpdateOne
  import eta.core.utils
  import fiftyone
  import fiftyone.core.dataset
  import fiftyone.core.fields
  import fiftyone.core.media
  import fiftyone.core.sample
  import fiftyone.core.odm
  import fiftyone.core.odm.sample
  import fiftyone.core.utils
  import fiftyone.core.validation
  import fiftyone.core.view
label_desc: Use image node_id 28 for calling the FramesView obj's underlying member method code with example usage: obj._sync_source_schema(fields, delete) without return types