code: def handle_dataset_validation(self, data_creator, config, steps):
      config, local_batch_size = self._handle_batch_size(config)
      config["rank"] = self.rank
      config["size"] = self.size
      dataset = data_creator(config, config["batch_size"])
      if isinstance(dataset, list) and all(
          [isinstance(x, dict) for x in dataset]
      ):
          invalidInputError(
              steps is not None, "steps must be provided for xshard"
          )
          dataset = self._handle_xshards(
              dataset,
              steps=steps,
              local_batch_size=local_batch_size,
              shuffle=False,
          )
      else:
          dataset = self._handle_sharding(dataset)
  
      return dataset
  
imports: import json
  import os
  import tempfile
  import shutil
  import copy
  import tensorflow
  from bigdl.orca.data.utils import partition_get_data_label
  from bigdl.orca.data.file import exists
  from bigdl.orca.learn.utils import save_pkl, duplicate_stdout_stderr_to_file, get_rank, process_tensorboard_in_callbacks, save_model, load_model, replace_specific_object_from_callbacks
  from bigdl.orca.learn.log_monitor import LogMonitor
  from bigdl.orca.learn.tf2.callbacks import ModelCheckpoint
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 3 for calling the DatasetHandler obj's underlying member method code with example usage: obj.handle_dataset_validation(data_creator, config, steps) and returns: dataset