code: def test_data_source_is_sliceable():
      mock_array_record_data_source = (
          tfds.testing.PickableDataSourceMock()
      )
      with tfds.testing.mock_data(
          mock_array_record_data_source=mock_array_record_data_source
      ):
          tfds.data_source("mnist", split="train")
          assert len(mock_array_record_data_source.call_args_list) == 1
          file_instructions = (
              mock_array_record_data_source.call_args_list[0].args[0]
          )
          assert file_instructions[0].skip == 0
          assert file_instructions[0].take == 60000
  
          tfds.data_source("mnist", split="train[:50%]")
          assert len(mock_array_record_data_source.call_args_list) == 2
          file_instructions = (
              mock_array_record_data_source.call_args_list[1].args[0]
          )
          assert file_instructions[0].skip == 0
          assert file_instructions[0].take == 30000
  
file_path: datasets/tensorflow_datasets/core/data_sources/array_record_test.py
imports: from unittest import mock
  import pytest
  import tensorflow_datasets
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import decode
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core.data_sources import array_record
  from tensorflow_datasets.core.utils import shard_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import array_record_data_source
label_desc: Use image node_id 9 for calling a global function with example usage: test_data_source_is_sliceable() without return types