code: def test_call_end2end(self, model, shard_inputs, include_debug_info):
      FLAGS.include_debug_info = include_debug_info
      (
          call_variants_outputs,
          examples,
          batch_size,
          max_batches,
      ) = self._call_end2end_helper(
          testdata.GOLDEN_CALLING_EXAMPLES, model, shard_inputs
      )
      # Check that we have the right number of output protos.
      self.assertEqual(
          len(call_variants_outputs),
          batch_size * max_batches if max_batches else len(examples),
      )
  
      # Check that our CallVariantsOutput (CVO) have the following critical
      # properties:
      # - we have one CVO for each example we processed.
      # - the variant in the CVO is exactly what was in the example.
      # - the alt_allele_indices of the CVO match those of its corresponding
      #   example.
      # - there are 3 genotype probabilities and these are between 0.0 and 1.0.
      # We can only do this test when processing all of the variants (max_batches
      # is None), since we processed all of the examples with that model.
      if max_batches is None:
          self.assertCountEqual(
              [cvo.variant for cvo in call_variants_outputs],
              [dv_utils.example_variant(ex) for ex in examples],
          )
  
      # Check the CVO debug_info: not filled if include_debug_info is False;
      # else, filled by logic based on CVO.
      if not include_debug_info:
          for cvo in call_variants_outputs:
              self.assertEqual(
                  cvo.debug_info,
                  deepvariant_pb2.CallVariantsOutput.DebugInfo(),
              )
      else:
          for cvo in call_variants_outputs:
              self.assertEqual(
                  cvo.debug_info.has_insertion,
                  variant_utils.has_insertion(cvo.variant),
              )
              self.assertEqual(
                  cvo.debug_info.has_deletion,
                  variant_utils.has_deletion(cvo.variant),
              )
              self.assertEqual(
                  cvo.debug_info.is_snp,
                  variant_utils.is_snp(cvo.variant),
              )
              self.assertEqual(
                  cvo.debug_info.predicted_label,
                  np.argmax(cvo.genotype_probabilities),
              )
              self.assertEqual(len(cvo.debug_info.logits), 3)
              self.assertEqual(len(cvo.debug_info.prelogits), 2048)
  
      def example_matches_call_variants_output(
          example, call_variants_output
      ):
          return (
              dv_utils.example_variant(example)
              == call_variants_output.variant
              and dv_utils.example_alt_alleles_indices(example)
              == call_variants_output.alt_allele_indices.indices
          )
  
      for call_variants_output in call_variants_outputs:
          # Find all matching examples.
          matches = [
              ex
              for ex in examples
              if example_matches_call_variants_output(
                  ex, call_variants_output
              )
          ]
          # We should have exactly one match.
          self.assertEqual(len(matches), 1)
          example = matches[0]
          # Check that we've faithfully copied in the alt alleles (though currently
          # as implemented we find our example using this information so it cannot
          # fail). Included here in case that changes in the future.
          self.assertEqual(
              list(dv_utils.example_alt_alleles_indices(example)),
              list(call_variants_output.alt_allele_indices.indices),
          )
          # We should have exactly three genotype probabilities (assuming our
          # ploidy == 2).
          self.assertEqual(
              len(call_variants_output.genotype_probabilities), 3
          )
          # These are probabilities so they should be between 0 and 1.
          self.assertTrue(
              0 <= gp <= 1
              for gp in call_variants_output.genotype_probabilities
          )
  
imports: import collections
  import errno
  import sys
  from unittest import mock
  from absl import flags
  from absl import logging
  from absl.testing import absltest
  from absl.testing import flagsaver
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow import estimator
  from deepvariant import call_variants_slim
  from deepvariant import dv_utils
  from deepvariant import modeling
  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
label_desc: Use image node_id 9 for calling the CallVariantsEndToEndTests obj's underlying member method code with example usage: obj.test_call_end2end(model, shard_inputs, include_debug_info) and returns: unknown