code: def get_default_dataset_config(
      runlocal=False, additional_valid_dataset=True
  ):
      """Gets default configs for argus dataset."""
      dataset_configs = ml_collections.ConfigDict()
      # Add path to your data here:
      dataset_configs.dataset = ""
      dataset_configs.train_split = "full[50000:]"
      MAX_LENGTH = OUTPUT_MAX_LENGTH  # pylint: disable=invalid-name
      pp_common = (
          f"decode|resize(resize_size={IMAGE_SIZE})|value_range(-1,1)"
      )
      pp_argus = (
          f'|t5_tokenize(max_num_tokens={KNOWLEDGE_MAX_LENGTH}, inkey="alt_texts",'
          ' outkey="retr_texts",'
          f' prompt="{data_utils.KNOWLEDGE_PREFIX}")|t5_tokenize(max_num_tokens={OUTPUT_MAX_LENGTH * 3},'
          ' inkey="alt_texts", outkey="caption_tokens",'
          f' prompt="{data_utils.CAPTION_PREFIX}")|keep("image", "caption_tokens",'
          ' "retr_texts")'
      )
      pp_cc = (
          f'|t5_tokenize(max_num_tokens={OUTPUT_MAX_LENGTH * 3}, inkey="texts",'
          ' outkey="caption_tokens",'
          f' prompt="{data_utils.CAPTION_PREFIX}")|t5_tokenize(max_num_tokens={KNOWLEDGE_MAX_LENGTH},'
          ' inkey="texts", outkey="retr_texts",'
          f' prompt="{data_utils.KNOWLEDGE_PREFIX}")|keep("image",'
          ' "caption_tokens", "retr_texts")'
      )
      pp_coco_eval = (
          pp_common
          + f"|coco_captions|t5_tokenize(max_num_tokens={OUTPUT_MAX_LENGTH * 3},"
          ' inkey="texts", outkey="caption_tokens",'
          f' prompt="{data_utils.CAPTION_PREFIX}")|t5_tokenize(max_num_tokens={KNOWLEDGE_MAX_LENGTH},'
          ' inkey="texts", outkey="retr_texts",'
          f' prompt="{data_utils.KNOWLEDGE_PREFIX}")|keep("image",'
          ' "caption_tokens", "retr_texts")'
      )
      dataset_configs.max_num_tokens = MAX_LENGTH
      dataset_configs.image_size = IMAGE_SIZE
      dataset_configs.pp_train = pp_common + pp_argus
      dataset_configs.shuffle_buffer_size = (
          250000 if not runlocal else 50
      )
  
      pp_argus_eval = pp_common + pp_argus
      pp_cc_eval = pp_common + pp_cc
      sub = "[:4]" if runlocal else ""
      if additional_valid_dataset:
          dataset_configs.val_split = [
              (
                  "val_argus",
                  dataset_configs.dataset,
                  ["full[:50000]", f"full{sub}"][runlocal],
                  pp_argus_eval,
              ),
              (
                  "val_cc",
                  "argus:cc12m/cc12m",
                  ["full[:50000]", f"full{sub}"][runlocal],
                  pp_cc_eval,
              ),
              ("coco", "coco_captions", "val", pp_coco_eval),
          ]
      else:
          dataset_configs.val_split = (
              f"full{sub}" if runlocal else "full[:50000]"
          )
          dataset_configs.pp_eval = pp_argus_eval
  
      dataset_configs.val_cache = (
          "loaded"  # Unfortunately, "batched" gets us OOM.
      )
      dataset_configs.vocab_size = data_utils.VOCAB_SIZE_T5
      dataset_configs.prefetch_to_device = 2
      return dataset_configs
  
file_path: scenic/scenic/projects/knowledge_visual_language/data/web_image_text_generation_dataset.py
imports: import functools
  from typing import Optional
  from absl import logging
  from flax import jax_utils
  import jax.numpy
  import ml_collections
  from scenic.dataset_lib import dataset_utils
  from scenic.dataset_lib import datasets
  from scenic.dataset_lib.big_transfer import builder
  from scenic.dataset_lib import web_image_text_dataset
  from scenic.projects.knowledge_visual_language.data import data_utils
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: get_default_dataset_config(runlocal, additional_valid_dataset) and returns: dataset_configs