code: def test_video_frames_merge(self):
      sample1 = fo.Sample(filepath="video1.mp4")
      sample1.frames[1] = fo.Frame(field1="a", field2="b")
  
      sample2 = fo.Sample(filepath="video2.mp4")
      sample2.frames[1] = fo.Frame(field1="c", field2="d")
  
      dataset = fo.Dataset()
      dataset.add_samples([sample1, sample2])
  
      view1 = dataset.select_fields("frames.field1")
      view2 = dataset.select_fields("frames.field2")
  
      self.assertTrue(dataset.has_frame_field("field1"))
      self.assertTrue(dataset.has_frame_field("field2"))
      self.assertTrue(view1.has_frame_field("field1"))
      self.assertFalse(view1.has_frame_field("field2"))
      self.assertFalse(view2.has_frame_field("field1"))
      self.assertTrue(view2.has_frame_field("field2"))
  
      frame_view1 = view1.first().frames.first()
  
      self.assertTrue(frame_view1.has_field("field1"))
      self.assertFalse(frame_view1.has_field("field2"))
  
      self.assertEqual(frame_view1.field1, "a")
      self.assertEqual(frame_view1["field1"], "a")
  
      with self.assertRaises(AttributeError):
          _ = frame_view1.field2
  
      with self.assertRaises(KeyError):
          _ = frame_view1["field2"]
  
      dataset1 = view1.clone()
      dataset2 = view2.clone()
  
      self.assertTrue(dataset1.has_frame_field("field1"))
      self.assertFalse(dataset1.has_frame_field("field2"))
      self.assertFalse(dataset2.has_frame_field("field1"))
      self.assertTrue(dataset2.has_frame_field("field2"))
  
      dataset3 = fo.Dataset()
      dataset3.merge_samples(dataset1)
      dataset3.merge_samples(dataset2)
      frame3 = dataset3.first().frames.first()
  
      self.assertTrue(dataset3.has_frame_field("field1"))
      self.assertTrue(dataset3.has_frame_field("field2"))
      self.assertEqual(frame3["field1"], "a")
      self.assertEqual(frame3["field2"], "b")
  
      dataset4 = fo.Dataset()
      dataset4.merge_samples(view1)
      dataset4.merge_samples(view2)
      frame4 = dataset4.first().frames.first()
  
      self.assertTrue(dataset4.has_frame_field("field1"))
      self.assertTrue(dataset4.has_frame_field("field2"))
      self.assertEqual(frame4["field1"], "a")
      self.assertEqual(frame4["field2"], "b")
  
imports: from copy import deepcopy
  from datetime import date, datetime
  from bson import ObjectId
  import numpy
  import unittest
  import fiftyone
  import fiftyone.core.odm
  from fiftyone import ViewField
  from decorators import drop_datasets
label_desc: Use image node_id 19 for calling the VideoTests obj's underlying member method code with example usage: obj.test_video_frames_merge() without return types