code: def _test_shards(data_path, pattern, num_shards):
      assert num_shards >= 1
      shards_filenames = [
          pattern.format(i, num_shards) for i in range(num_shards)
      ]
      assert all(
          data_path.joinpath(f).exists() for f in shards_filenames
      )
  
imports: import pathlib
  from typing import Callable
  from unittest import mock
  import apache_beam
  from etils import epath
  import numpy
  import pytest
  import tensorflow
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.core import download
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import utils
label_desc: Use image node_id 6 for calling a global function with example usage: _test_shards(data_path, pattern, num_shards) without return types