code: def test_list_dataset_references(mock_fs: testing.MockFs):
      path = "/path/ns1"
      mock_fs.add_file(path=f"{path}/ds1/1.0.0/dataset_info.json")
      mock_fs.add_file(path=f"{path}/ds1/1.0.0/features.json")
      mock_fs.add_file(
          path=f"{path}/ds2/config1/1.0.0/dataset_info.json"
      )
      mock_fs.add_file(path=f"{path}/ds2/config1/1.0.0/features.json")
      mock_fs.add_file(
          path=f"{path}/ds2/config1/2.0.0/dataset_info.json"
      )
      mock_fs.add_file(path=f"{path}/ds2/config1/2.0.0/features.json")
      mock_fs.add_file(
          path=f"{path}/ds2/config2/1.0.0/dataset_info.json"
      )
      mock_fs.add_file(path=f"{path}/ds2/config2/1.0.0/features.json")
      data_dir = epath.Path("/path/ns1")
      register = register_path.DataDirRegister(
          namespace_to_data_dirs={"ns1": [data_dir]}
      )
      assert sorted(register.list_dataset_references()) == [
          naming.DatasetReference(
              dataset_name="ds1", namespace="ns1", data_dir=data_dir
          ),
          naming.DatasetReference(
              dataset_name="ds2", namespace="ns1", data_dir=data_dir
          ),
      ]
  
imports: from etils import epath
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core.community import register_path
label_desc: Use image node_id 2 for calling a global function with example usage: test_list_dataset_references(mock_fs) without return types