code: def _download_and_prepare(
      args: argparse.Namespace,
      builder: tfds.core.DatasetBuilder,
  ) -> None:
      """Generate a single builder."""
      logging.info(
          f"download_and_prepare for dataset {builder.info.full_name}..."
      )
  
      publish_data_dir = _publish_data_dir(args.publish_dir, builder)
      if args.skip_if_published and publish_data_dir is not None:
          if publish_data_dir.exists():
              logging.info(
                  f"Dataset already exists in {publish_data_dir}. Skipping generation."
              )
              return
  
      dl_config = _make_download_config(args, dataset_name=builder.name)
      builder.download_and_prepare(
          download_dir=args.download_dir,
          download_config=dl_config,
      )
  
      # Dataset generated successfully
      logging.info("Dataset generation complete...")
  
      print()
      print(repr(builder.info))
      print()
  
      # Publish data if requested.
      if publish_data_dir is not None:
          logging.info(f"Publishing dataset to {publish_data_dir}")
          _publish_data(
              publish_data_dir=publish_data_dir,
              builder=builder,
              overwrite=args.overwrite,
          )
          logging.info(
              f"Dataset successfully published to {publish_data_dir}"
          )
  
imports: import argparse
  import functools
  import importlib
  import itertools
  import json
  import multiprocessing
  import os
  import typing
  from typing import Dict, Iterator, Optional, Tuple, Type, Union
  from absl import logging
  from etils import epath
  import tensorflow_datasets
label_desc: Use image node_id 9 for calling a global function with example usage: _download_and_prepare(args, builder) without return types