code: def test_instances_must_have_homogeneous_fields(self):
      instance1 = Instance({"tag": (LabelField(1, skip_indexing=True))})
      instance2 = Instance({"words": TextField([Token("hello")], {})})
      with pytest.raises(ConfigurationError):
          _ = Batch([instance1, instance2])
  
file_path: allennlp/tests/data/dataset_test.py
imports: import pytest
  import numpy
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import Instance, Token, Vocabulary
  from allennlp.data.batch import Batch
  from allennlp.data.fields import TextField, LabelField
  from allennlp.data.token_indexers import SingleIdTokenIndexer
label_desc: Use image node_id 2 for calling the TestDataset obj's underlying member method code with example usage: obj.test_instances_must_have_homogeneous_fields() without return types