code: def test_get_shard_size():
      """
      Test that using ids for getting the shard size does not break the method.
      The issue arises when attempting to load a dataset that does not have a labels
      column. The create_dataset method of the DataLoader class sets the y to None
      in this case, which causes the existing implementation of the get_shard_size()
      method to fail, as it relies on the dataset having a not None y column. This
      consequently breaks all methods depending on this, like the splitters for
      example.
  
      Note
      ----
      DiskDatasets without labels cannot be resharded!
      """
  
      current_dir = os.path.dirname(os.path.abspath(__file__))
      file_path = os.path.join(current_dir, "reaction_smiles.csv")
  
      featurizer = dc.feat.DummyFeaturizer()
      loader = dc.data.CSVLoader(
          tasks=[], feature_field="reactions", featurizer=featurizer
      )
  
      dataset = loader.create_dataset(file_path)
      assert dataset.get_shard_size() == 4
  
file_path: deepchem/deepchem/data/tests/test_shape.py
imports: import deepchem
  import numpy
  import os
label_desc: Use image node_id 6 for calling a global function with example usage: test_get_shard_size() without return types