code: def test_dataset_clear(self):
      dataset = fo.Dataset()
  
      self.assertEqual(len(dataset), 0)
  
      # add some samples
      num_samples = 10
      samples = [
          fo.Sample(filepath="/path/to/image_%d.jpg" % i)
          for i in range(num_samples)
      ]
      dataset.add_samples(samples)
      self.assertEqual(len(dataset), num_samples)
  
      # delete all samples
      dataset.clear()
      self.assertEqual(len(dataset), 0)
  
      # add some new samples
      num_samples = 5
      samples = [
          fo.Sample(filepath="/path/to/image_%d.jpg" % i)
          for i in range(num_samples)
      ]
      dataset.add_samples(samples)
      self.assertEqual(len(dataset), num_samples)
  
imports: import os
  import tempfile
  import unittest
  from bson import Binary, ObjectId
  import numpy
  from PIL import ExifTags, Image
  import fiftyone
  from fiftyone import ViewField
  import fiftyone.core.odm
  import fiftyone.core.sample
  from decorators import drop_datasets
label_desc: Use image node_id 2 for calling the SampleInDatasetTests obj's underlying member method code with example usage: obj.test_dataset_clear() without return types