code: def test_read_overlaps_region(
      self, ref1, s1, e1, ref2, s2, e2, expected
  ):
      def check_overlaps(
          chr1, start1, end1, chr2, start2, end2, expected
      ):
          nbp = end1 - start1
          read = test_utils.make_read(
              "A" * nbp,
              chrom=chr1,
              start=start1,
              cigar="{}M".format(nbp),
          )
          region = ranges.make_range(chr2, start2, end2)
          self.assertEqual(
              utils.read_overlaps_region(read, region), expected
          )
          # This check ensures we get the same result calling ranges.ranges_overlap.
          self.assertEqual(
              ranges.ranges_overlap(region, utils.read_range(read)),
              expected,
          )
  
      check_overlaps(ref1, s1, e1, ref2, s2, e2, expected)
      check_overlaps(ref2, s2, e2, ref1, s1, e1, expected)
  
file_path: deepvariant/third_party/nucleus/util/utils_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import numpy.testing
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import utils
label_desc: Use image node_id 5 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_read_overlaps_region(ref1, s1, e1, ref2, s2, e2, expected) without return types