code: def test_fraction_reads_with_low_mapq(self):
      shape = (10, 15)
      filler_channels = [0] * 2
      high_quality = filler_channels + [np.zeros(shape) + 254]
      low_quality = filler_channels + [np.zeros(shape) + 100]
      empty = filler_channels + [np.zeros(shape)]
      golden_pileup = filler_channels + [
          _mock_pileup_array_with_reads()
      ]
      self.assertEqual(
          0,
          vis.fraction_reads_with_low_mapq(high_quality),
          msg="All high quality",
      )
      self.assertEqual(
          1,
          vis.fraction_reads_with_low_mapq(low_quality),
          msg="All low quality",
      )
      self.assertEqual(
          0,
          vis.fraction_reads_with_low_mapq(empty),
          msg="Empty pileup, no reads",
      )
      self.assertEqual(
          0.25,
          vis.fraction_reads_with_low_mapq(golden_pileup),
          msg="Mixed high and low quality",
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import glob
  import os
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from third_party.nucleus.protos import variants_pb2
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import vis
  from tensorflow.core.example import example_pb2
  from tensorflow.core.example import feature_pb2
label_desc: Use image node_id 22 for calling the VisTest obj's underlying member method code with example usage: obj.test_fraction_reads_with_low_mapq() without return types