code: def test_build_nightly_dict(self):
      nightly_dict = doc_utils._build_nightly_dict(
          # Registered datasets
          doc_utils._full_names_to_dict(
              [
                  "ds_same/config/1.0.0",
                  "ds_with_config/config_new/2.0.0",  # Added config
                  "ds_with_config/config_same/2.0.0",  # Added version
                  "ds_with_config/config_same/1.0.0",
                  "ds_new/1.0.0",  # Added dataset
                  "ds_changed/2.0.0",  # Added version
                  "ds_changed/1.0.0",
                  "ds_type/config/1.0.0",  # `ds/version` -> `ds/config/version`
              ]
          ),
          # Stable datasets
          doc_utils._full_names_to_dict(
              [
                  "ds_same/config/1.0.0",
                  "ds_with_config/config_same/1.0.0",
                  "ds_with_config/config_same/0.0.0",  # Removed version
                  "ds_with_config/config_removed/1.0.0",  # Removed config
                  "ds_changed/1.0.0",
                  "ds_changed/0.0.0",  # Removed version
                  "ds_removed/1.0.0",  # Removed dataset',
                  "ds_type/1.0.0",  # `ds/version` -> `ds/config/version`
              ]
          ),
      )
      # Check that the added datasets, config, versions are marked as nightly
      self.assertEqual(
          nightly_dict,
          {
              "ds_with_config": {
                  "config_new": True,
                  "config_same": {
                      "2.0.0": True,
                      "1.0.0": False,
                  },
              },
              "ds_new": True,
              "ds_changed": {
                  "": {
                      "2.0.0": True,
                      "1.0.0": False,
                  },
              },
              "ds_same": {"config": {"1.0.0": False}},
              "ds_type": {"config": True},
          },
      )
  
file_path: datasets/tensorflow_datasets/scripts/documentation/doc_utils_test.py
imports: from unittest import mock
  import tensorflow_datasets
  from tensorflow_datasets.scripts.documentation import doc_utils
label_desc: Use image node_id 2 for calling the DocumentNightlyDatasetsTest obj's underlying member method code with example usage: obj.test_build_nightly_dict() without return types