code: def get_eval_loader(dataset, envs, batch_size, class_balanced=False):
      """Return evaluation dataloaders (test/validation).
  
      :param dataset: dataset class containing list of environments
      :param envs: list containing indices of validation/test domains in the dataset
      :param batch_size: Value of batch size to be used for dataloaders
      :param class_balanced: Binary flag indicating whether balanced sampling is to be done between classes
  
      :returns: list of dataloaders
      """
      splits = []
  
      for env_idx, env in enumerate(dataset):
          if env_idx in envs:
              if class_balanced:
                  weights = misc.make_weights_for_balanced_classes(env)
              else:
                  weights = None
              splits.append((env, weights))
  
      eval_loaders = [
          FastDataLoader(
              dataset=env,
              batch_size=batch_size,
              num_workers=dataset.N_WORKERS,
          )
          for env, _ in splits
      ]
  
      return eval_loaders
  
imports: from dowhy.causal_prediction.dataloaders import misc
  from dowhy.causal_prediction.dataloaders.fast_data_loader import FastDataLoader, InfiniteDataLoader
label_desc: Use image node_id 2 for calling a global function with example usage: get_eval_loader(dataset, envs, batch_size, class_balanced) and returns: eval_loaders