code: def get_default_dataset_config(runlocal=False):
      """Gets default configs for CC12M dataset."""
      dataset_configs = ml_collections.ConfigDict()
      dataset_configs.dataset = "okvqa"
      # Add path to your data here:
      dataset_configs.dataset_dir = ""
      dataset_configs.train_split = "train"
      dataset_configs.question_max_num_tokens = QUESTION_LENGTH
      dataset_configs.answer_max_num_tokens = ANSWER_LENGTH
      dataset_configs.image_size = IMAGE_SIZE
      dataset_configs.pp_train = (
          f'decode|resize(resize_size={IMAGE_SIZE})|value_range(-1,1)|get_qa_pair|t5_tokenize(max_num_tokens={KNOWLEDGE_MAX_LENGTH},inkey="top_answers",'
          ' outkey="retr_texts",'
          f' prompt="{data_utils.KNOWLEDGE_PREFIX}")|t5_tokenize(max_num_tokens={ANSWER_LENGTH},'
          f' inkey="answer",outkey="answer")|multi_t5_tokenize(max_num_tokens={ANSWER_LENGTH},inkey="answers",outkey="answers")|t5_tokenize(max_num_tokens={QUESTION_LENGTH},'
          ' inkey="question", outkey="question",'
          f' prompt="{data_utils.VQA_PREFIX}")|keep("image", "question", "answer",'
          ' "retr_texts", "answers")'
      )
  
      dataset_configs.val_split = [
          (
              "val",
              dataset_configs.dataset,
              "validation",
              dataset_configs.pp_train,
          )
      ]
  
      dataset_configs.shuffle_buffer_size = (
          10000 if not runlocal else 50
      )
      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/okvqa_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 bit
  from scenic.dataset_lib.big_transfer import builder
  from scenic.dataset_lib.big_transfer import registry
  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 3 for calling a global function with example usage: get_default_dataset_config(runlocal) and returns: dataset_configs