code: def test_load(self):
      name = "empty_dataset_builder/k1=1"
      data_dir = "foo"
      as_dataset_kwargs = dict(a=1, b=2)
  
      # EmptyDatasetBuilder returns self from as_dataset
      builder = load.load(
          name=name,
          split=splits.Split.TEST,
          data_dir=data_dir,
          download=False,
          as_dataset_kwargs=as_dataset_kwargs,
      )
      self.assertTrue(builder.as_dataset_called)
      self.assertFalse(builder.download_called)
      self.assertEqual(
          splits.Split.TEST, builder.as_dataset_kwargs.pop("split")
      )
      self.assertIsNone(builder.as_dataset_kwargs.pop("batch_size"))
      self.assertFalse(builder.as_dataset_kwargs.pop("as_supervised"))
      self.assertFalse(builder.as_dataset_kwargs.pop("decoders"))
      self.assertIsNone(builder.as_dataset_kwargs.pop("read_config"))
      self.assertFalse(builder.as_dataset_kwargs.pop("shuffle_files"))
      self.assertEqual(builder.as_dataset_kwargs, as_dataset_kwargs)
      self.assertEqual(dict(data_dir=data_dir, k1=1), builder.kwargs)
  
      builder = load.load(
          name,
          split=splits.Split.TRAIN,
          data_dir=data_dir,
          download=True,
          as_dataset_kwargs=as_dataset_kwargs,
      )
      self.assertTrue(builder.as_dataset_called)
      self.assertTrue(builder.download_called)
  
      # Tests for different batch_size
      # By default batch_size=None
      builder = load.load(
          name=name, split=splits.Split.TEST, data_dir=data_dir
      )
      self.assertIsNone(builder.as_dataset_kwargs.pop("batch_size"))
      # Setting batch_size=1
      builder = load.load(
          name=name,
          split=splits.Split.TEST,
          data_dir=data_dir,
          batch_size=1,
      )
      self.assertEqual(1, builder.as_dataset_kwargs.pop("batch_size"))
  
imports: import abc
  import re
  from unittest import mock
  import pytest
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import constants
  from tensorflow_datasets.core import load
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils import py_utils
  import tensorflow_datasets.public_api
  from tensorflow_datasets.testing.dummy_config_based_datasets.dummy_ds_1 import dummy_ds_1_dataset_builder
label_desc: Use image node_id 7 for calling the RegisteredTest obj's underlying member method code with example usage: obj.test_load() without return types