code: def build_synthetic_dataset(
      dataset_size: int, features: List[dict], outdir: str = "."
  ):
      """Synthesizes a dataset for testing purposes.
  
      :param dataset_size: (int) size of the dataset
      :param features: (List[dict]) list of features to generate in YAML format.
          Provide a list containing one dictionary for each feature,
          each dictionary must include a name, a type
          and can include some generation parameters depending on the type
      :param outdir: (str) Path to an output directory. Used for saving synthetic image and audio files.
  
      Example content for features:
  
      [
          {name: text_1, type: text, vocab_size: 20, max_len: 20},
          {name: text_2, type: text, vocab_size: 20, max_len: 20},
          {name: category_1, type: category, vocab_size: 10},
          {name: category_2, type: category, vocab_size: 15},
          {name: number_1, type: number},
          {name: number_2, type: number},
          {name: binary_1, type: binary},
          {name: binary_2, type: binary},
          {name: set_1, type: set, vocab_size: 20, max_len: 20},
          {name: set_2, type: set, vocab_size: 20, max_len: 20},
          {name: bag_1, type: bag, vocab_size: 20, max_len: 10},
          {name: bag_2, type: bag, vocab_size: 20, max_len: 10},
          {name: sequence_1, type: sequence, vocab_size: 20, max_len: 20},
          {name: sequence_2, type: sequence, vocab_size: 20, max_len: 20},
          {name: timeseries_1, type: timeseries, max_len: 20},
          {name: timeseries_2, type: timeseries, max_len: 20},
          {name: date_1, type: date},
          {name: date_2, type: date},
          {name: h3_1, type: h3},
          {name: h3_2, type: h3},
          {name: vector_1, type: vector},
          {name: vector_2, type: vector},
      ]
      """
      build_feature_parameters(features)
      header = []
      for feature in features:
          header.append(feature[NAME])
  
      yield header
      for _ in range(dataset_size):
          yield generate_datapoint(features=features, outdir=outdir)
  
imports: import argparse
  import logging
  import os
  import random
  import string
  import sys
  import uuid
  from typing import Dict, List, Optional, Union
  import numpy
  import pandas
  import torch
  import torchaudio
  import yaml
  from packaging import version
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import AUDIO, BAG, BINARY, CATEGORY, CATEGORY_DISTRIBUTION, DATE, DECODER, ENCODER, H3, IMAGE, INPUT_FEATURES, NAME, NUMBER, OUTPUT_FEATURES, PREPROCESSING, SEQUENCE, SET, TEXT, TIMESERIES, TYPE, VECTOR
  from ludwig.contrib import add_contrib_callback_args
  from ludwig.globals import LUDWIG_VERSION
  from ludwig.types import ModelConfigDict
  from ludwig.utils.data_utils import save_csv
  from ludwig.utils.h3_util import components_to_h3
  from ludwig.utils.misc_utils import get_from_registry
  from ludwig.utils.print_utils import print_ludwig
label_desc: Use image node_id 8 for calling a global function with example usage: build_synthetic_dataset(dataset_size, features, outdir) without return types