code: def store_as_tfds_dataset(
      name: str,
      version: utils.Version | str,
      features: feature_lib.FeatureConnector,
      split_datasets: Mapping[str, InputData],
      config: None | str | dataset_builder.BuilderConfig = None,
      data_dir: epath.PathLike | None = None,
      description: str | None = None,
      release_notes: Mapping[str, str] | None = None,
      homepage: str | None = None,
      citation: str | None = None,
      file_format: str | file_adapters.FileFormat | None = None,
      download_config: download.DownloadConfig | None = None,
      disable_shuffling: bool | None = False,
  ) -> AdhocBuilder:
      """Store a dataset as a TFDS dataset."""
      if not split_datasets:
          raise ValueError("No splits with datasets were given.")
      ds_types = {type(ds) for ds in split_datasets.values()}
      if len(ds_types) > 1:
          raise TypeError(
              f"All split datasets should have the same type. Got: {ds_types}"
          )
  
      builder = AdhocBuilder(
          name=name,
          version=version,
          features=features,
          split_datasets=split_datasets,
          config=config,
          data_dir=data_dir,
          description=description,
          release_notes=release_notes,
          homepage=homepage,
          citation=citation,
          disable_shuffling=disable_shuffling,
      )
      if builder.is_prepared():
          raise RuntimeError(
              f"Dataset '{name}' was already prepared as a TFDS dataset. Dataset"
              f" info: {builder.info}"
          )
      builder.download_and_prepare(
          download_config=download_config, file_format=file_format
      )
      logging.info(
          "Dataset '%s' was prepared as a TFDS dataset in folder %s",
          name,
          builder.data_dir,
      )
      return builder
  
imports: from __future__ import annotations
  from collections.abc import Iterable, Mapping
  import typing
  from typing import Any, Dict
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core import dataset_builder
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.core import download
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import split_builder
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import apache_beam
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: store_as_tfds_dataset(name, version, features, split_datasets, config, data_dir, description, release_notes, homepage, citation, file_format, download_config, disable_shuffling) and returns: builder