code: def test_max_examples(self, max_examples, batch_size):
      input_fn = data_providers.get_input_fn_from_filespec(
          input_file_spec=testdata.GOLDEN_TRAINING_EXAMPLES,
          num_examples=testdata.N_GOLDEN_TRAINING_EXAMPLES,
          name="labeled_golden",
          max_examples=max_examples,
          mode=tf_estimator.ModeKeys.TRAIN,
      )
  
      n_batches_to_read = 100
      with tf.compat.v1.Session() as sess:
          sess.run(tf.compat.v1.global_variables_initializer())
  
          iterator = tf.compat.v1.data.make_one_shot_iterator(
              input_fn(dict(batch_size=batch_size))
          )
          next_element = iterator.get_next()
  
          def read_loci_in_batches():
              features, _ = sess.run(next_element)
              return features["locus"]
  
          batches = [
              read_loci_in_batches() for _ in range(n_batches_to_read)
          ]
          # pylint: disable=g-complex-comprehension
          unique_loci = {locus for batch in batches for locus in batch}
          # pylint: enable=g-complex-comprehension
          # assertLen not available OSS.
          # pylint: disable=g-generic-assert
          self.assertEqual(len(unique_loci), max_examples)
  
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 12 for calling the DataProviderTest obj's underlying member method code with example usage: obj.test_max_examples(max_examples, batch_size) and returns: features