code: def test_dynamic_label_tags(self):
      sample1 = fo.Sample(
          filepath="image1.jpg",
          dynamic=fo.DynamicEmbeddedDocument(
              classification=fo.Classification(label="hi"),
              classifications=fo.Classifications(
                  classifications=[
                      fo.Classification(label="spam"),
                      fo.Classification(label="eggs"),
                  ]
              ),
          ),
      )
  
      sample2 = fo.Sample(filepath="image2.jpg")
  
      dataset = fo.Dataset()
      dataset.add_samples([sample1, sample2], dynamic=True)
  
      label_fields = set(dataset._get_label_fields())
  
      self.assertSetEqual(
          label_fields,
          {
              "dynamic.classification",
              "dynamic.classifications",
          },
      )
  
      self.assertDictEqual(dataset.count_label_tags(), {})
  
      dataset.tag_labels("test")
  
      self.assertDictEqual(dataset.count_label_tags(), {"test": 3})
  
      dataset.untag_labels("test")
  
      self.assertDictEqual(dataset.count_label_tags(), {})
  
      dataset.tag_labels("test", label_fields="dynamic.classifications")
  
      self.assertDictEqual(dataset.count_label_tags(), {"test": 2})
      self.assertDictEqual(
          dataset.count_label_tags(
              label_fields="dynamic.classifications"
          ),
          {"test": 2},
      )
  
      dataset.untag_labels(
          "test", label_fields="dynamic.classifications"
      )
  
      self.assertDictEqual(dataset.count_label_tags(), {})
      self.assertDictEqual(
          dataset.count_label_tags(
              label_fields="dynamic.classifications"
          ),
          {},
      )
  
file_path: fiftyone/tests/unittests/label_tests.py
imports: import unittest
  from bson import Binary, ObjectId
  import numpy
  import fiftyone
  from decorators import drop_datasets
label_desc: Use image node_id 4 for calling the LabelTests obj's underlying member method code with example usage: obj.test_dynamic_label_tags() without return types