code: def test_subsplit_failure_with_batch_size(
      dummy_dataset: dataset_builder.DatasetBuilder,
      tmp_path: pathlib.Path,
      split,
      expected_implemented_with_batchsize,
  ):
      implemented_with_batchsize = True
      try:
          import apache_beam as beam  # pylint: disable=g-import-not-at-top
  
          with beam.Pipeline() as pipeline:
              _ = (
                  pipeline
                  | beam_utils.ReadFromTFDS(
                      dummy_dataset, split=split, batch_size=2
                  )
                  | beam.Map(dataset_utils.as_numpy)
                  | beam.io.WriteToText(os.fspath(tmp_path / "out.txt"))
              )
  
      except NotImplementedError:
          implemented_with_batchsize = False
      assert (
          implemented_with_batchsize
          == expected_implemented_with_batchsize
      )
  
file_path: datasets/tensorflow_datasets/core/beam_utils_test.py
imports: import os
  import pathlib
  from typing import Optional
  import pytest
  from tensorflow_datasets.core import beam_utils
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import dataset_utils
label_desc: Use image node_id 2 for calling a global function with example usage: test_subsplit_failure_with_batch_size(dummy_dataset, tmp_path, split, expected_implemented_with_batchsize) without return types