class_docstr: Tests that are common to all Allen Brain Atlas problems.
class_docstr_tok: ["Tests","that","are","common","to","all","Allen","Brain","Atlas","problems","."]
docstr: Basic test that the generator produces examples with expected keys.
docstr_tok: ["Basic","test","that","the","generator","produces","examples","with","expected","keys","."]
code: def test_generator_produces_examples(self):
      """Basic test that the generator produces examples with expected keys."""
  
      for is_training in [True, False]:
          with TemporaryDirectory() as tmp_dir:
              mock_raw_data(tmp_dir, raw_dim=256, num_images=100)
              for example in allen_brain._generator(
                  tmp_dir, is_training
              ):
                  for key in [
                      "image/encoded",
                      "image/format",
                      "image/height",
                      "image/width",
                  ]:
                      self.assertTrue(key in example.keys())
  
imports: import os
  import shutil
  import tempfile
  import numpy
  from tensor2tensor.data_generators import allen_brain
  from tensor2tensor.models import image_transformer_2d
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 2 for calling the TestAllenBrain obj's underlying member method code with example usage: obj.test_generator_produces_examples() without return types