code: def test_get_default_batcher(self):
      iterable = list(range(100))
  
      target_latency = 0.25
      with patch.object(fo.config, "default_batcher", "latency"):
          with patch.object(
              fo.config,
              "batcher_target_latency",
              target_latency,
          ):
              batcher = fou.get_default_batcher(iterable)
              self.assertTrue(isinstance(batcher, fou.DynamicBatcher))
              self.assertEqual(
                  batcher.target_measurement, target_latency
              )
  
      static_batch_size = 1000
      with patch.object(fo.config, "default_batcher", "static"):
          with patch.object(
              fo.config,
              "batcher_static_size",
              static_batch_size,
          ):
              batcher = fou.get_default_batcher(iterable)
              self.assertTrue(isinstance(batcher, fou.StaticBatcher))
              self.assertEqual(batcher.batch_size, static_batch_size)
  
      target_size = 2**16
      with patch.object(fo.config, "default_batcher", "size"):
          with patch.object(
              fo.config,
              "batcher_target_size_bytes",
              target_size,
          ):
              batcher = fou.get_default_batcher(iterable)
              self.assertTrue(
                  isinstance(batcher, fou.BSONSizeDynamicBatcher)
              )
              self.assertEqual(batcher.target_measurement, target_size)
  
      with patch.object(fo.config, "default_batcher", "invalid"):
          self.assertRaises(
              ValueError, fou.get_default_batcher, iterable
          )
  
imports: import time
  import unittest
  from unittest.mock import MagicMock, patch
  import numpy
  import fiftyone
  import fiftyone.constants
  import fiftyone.core.media
  import fiftyone.core.odm
  import fiftyone.core.utils
  from fiftyone.migrations.runner import MigrationRunner
  from decorators import drop_datasets
  from bson import ObjectId
  from fiftyone.core.odm.utils import load_dataset
label_desc: Use image node_id 1 for calling the BatcherTests obj's underlying member method code with example usage: obj.test_get_default_batcher() without return types