code: def test_get_shard_file_names(self) -> None:
      with in_temporary_directory() as temp_dir:
          # Generate a bunch of split/feature files
          for split in ["train", "test"]:
              for layer in ["heads", "res5"]:
                  self.prepare_data(
                      split=split,
                      layer=layer,
                      num_shards=2,
                      feat_shape=(10, 16),
                  )
  
          # Check that we only consider the right files
          paths = ExtractedFeaturesLoader.get_shard_file_names(
              input_dir=temp_dir, split="train", layer="heads"
          )
          feature_files = {
              os.path.split(path.feature_file)[1] for path in paths
          }
          self.assertEqual(
              feature_files,
              {
                  "chunk0_train_heads_features.npy",
                  "chunk1_train_heads_features.npy",
              },
          )
  
file_path: vissl/tests/test_extract_features_utils.py
imports: import os
  import unittest
  from typing import Tuple
  import numpy
  from vissl.utils.extract_features_utils import ExtractedFeaturesLoader
  from vissl.utils.io import save_file
  from vissl.utils.test_utils import in_temporary_directory
label_desc: Use image node_id 2 for calling the TestExtractFeatureUtils obj's underlying member method code with example usage: obj.test_get_shard_file_names() without return types