code: def test_get_number_shards_if_specified(self):
      shard_config = shard_utils.ShardConfig(num_shards=42)
      self.assertEqual(
          42,
          shard_config.get_number_shards(
              total_size=100, num_examples=1, uses_precise_sharding=True
          ),
      )
  
imports: from absl.testing import parameterized
  from tensorflow_datasets import testing
  from tensorflow_datasets.core.utils import shard_utils
label_desc: Use image node_id 2 for calling the ShardConfigTest obj's underlying member method code with example usage: obj.test_get_number_shards_if_specified() without return types