code: def load_data_from_builder(
      builder,
      train_split,
      validation_split,
      image_size,
      width_ratio,
      batch_size,
      one_hot,
      num_classes,
  ):
      """Loads the train and validation dataset from a dataset builder."""
      builder.download_and_prepare()
  
      num_examples = builder.info.splits[train_split].num_examples
      train_ds = builder.as_dataset(
          train_split, shuffle_files=True, as_supervised=True
      )
      train_ds = data_pipeline(
          train_ds,
          image_size,
          width_ratio,
          batch_size,
          num_classes,
          one_hot,
          num_examples,
      )
  
      if validation_split is not None:
          validation_ds = builder.as_dataset(
              validation_split, shuffle_files=True, as_supervised=True
          )
          validation_ds = data_pipeline(
              validation_ds,
              image_size,
              width_ratio,
              batch_size,
              num_classes,
              one_hot,
              num_examples,
          )
      else:
          validation_ds = None
  
      return train_ds, validation_ds
  
imports: import os
  import pickle
  from typing import Any, Dict, Optional
  import uuid
  from ..None import machine_config
  from ..None import run
  import tensorflow
  import tensorflow_datasets
  from official.legacy.image_classification.efficientnet import efficientnet_model
  from official.legacy.image_classification.resnet import resnet_model
label_desc: Use image node_id 5 for calling a global function with example usage: load_data_from_builder(builder, train_split, validation_split, image_size, width_ratio, batch_size, one_hot, num_classes) and returns: train_ds,  validation_ds