code: def test_dataset_reference_dataset_dir(
      tfds_name, data_dir, dataset_dir
  ):
      reference = naming.DatasetReference.from_tfds_name(
          tfds_name=tfds_name, data_dir=data_dir
      )
      assert os.fspath(reference.dataset_dir()) == dataset_dir
  
      # Also test passing the data_dir to `.dataset_dir`
      reference = naming.DatasetReference.from_tfds_name(
          tfds_name=tfds_name, data_dir="/something/else"
      )
      assert (
          os.fspath(reference.dataset_dir(data_dir=data_dir))
          == dataset_dir
      )
  
imports: import os
  from absl.testing import parameterized
  from etils import epath
  import pytest
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import splits
label_desc: Use image node_id 40 for calling a global function with example usage: test_dataset_reference_dataset_dir(tfds_name, data_dir, dataset_dir) without return types