code: def test_get_batches(self, compressed_inputs, mode, use_tpu):
      mode = (
          tf_estimator.ModeKeys.EVAL
          if mode == "EVAL"
          else tf_estimator.ModeKeys.TRAIN
      )
      input_fn = make_golden_dataset(
          compressed_inputs, mode=mode, use_tpu=use_tpu
      )
      batch_size = 16
      with tf.compat.v1.Session() as sess:
          batch = tf.compat.v1.data.make_one_shot_iterator(
              input_fn(dict(batch_size=batch_size))
          ).get_next()
  
          # Get our images, labels, and variants for further testing.
          sess.run(tf.compat.v1.global_variables_initializer())
          features, labels = sess.run(batch)
          variants = features["variant"]
          images = features["image"]
  
          # Checks that our labels are the right shape and are one-hot encoded.
          # Note that the shape is 100, not 107, because we only adjust the image
          # in the model_fn now, where previously it was done in the input_fn.
          self.assertEqual(
              [batch_size] + dv_constants.PILEUP_DEFAULT_DIMS,
              list(images.shape),
          )
          self.assertEqual((batch_size,), labels.shape)
          for label in labels:
              # pylint: disable=g-generic-assert
              self.assertTrue(0 <= label < dv_constants.NUM_CLASSES)
  
          # Check that our variants has the shape we expect and actually contain
          # variants by decoding them and checking the reference_name.
          self.assertEqual(batch_size, variants.shape[0])
          for variant in variants:
              if use_tpu:
                  variant = dv_utils.int_tensor_to_string(variant)
              for v in variant_utils.decode_variants([variant]):
                  self.assertEqual(v.reference_name, "chr20")
  
imports: import math
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow import estimator
  from deepvariant import data_providers
  from deepvariant import dv_config
  from deepvariant import dv_constants
  from deepvariant import dv_utils
  from deepvariant import testdata
  from deepvariant.protos import deepvariant_pb2
  from third_party.nucleus.io import tfrecord
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import variant_utils
  from tensorflow.core.example import example_pb2
label_desc: Use image node_id 9 for calling the DataProviderTest obj's underlying member method code with example usage: obj.test_get_batches(compressed_inputs, mode, use_tpu) without return types