code: def test_all_at_once(self):
      readers = {
          "f": PlainTextReader(),
          "g": PlainTextReader(),
          "h": PlainTextReader(),
      }
  
      reader = InterleavingDatasetReader(
          readers, dataset_field_name="source", scheme="all_at_once"
      )
      data_dir = self.FIXTURES_ROOT / "data"
  
      file_path = f"""{{
              "f": "{data_dir / 'babi.txt'}",
              "g": "{data_dir / 'conll2003.txt'}",
              "h": "{data_dir / 'conll2003.txt'}"
          }}"""
  
      buckets = []
      last_source = None
  
      # Fill up a bucket until the source changes, then start a new one
      for instance in reader.read(file_path):
          source = instance.fields["source"].metadata
          if source != last_source:
              buckets.append([])
              last_source = source
          buckets[-1].append(instance)
  
      # should be in 3 buckets
      assert len(buckets) == 3
  
imports: from typing import Iterable
  import pytest
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data.dataset_readers import DatasetReader, InterleavingDatasetReader
  from allennlp.data.data_loaders import MultiProcessDataLoader
  from allennlp.data.fields import TextField
  from allennlp.data.instance import Instance
  from allennlp.data.token_indexers import SingleIdTokenIndexer
  from allennlp.data.tokenizers import SpacyTokenizer
  from allennlp.data.vocabulary import Vocabulary
label_desc: Use image node_id 2 for calling the TestInterleavingDatasetReader obj's underlying member method code with example usage: obj.test_all_at_once() without return types