code: def test2DSpanOverlaps(
      self,
      name,
      source_start,
      source_limit,
      target_start,
      target_limit,
      expected_overlap_pairs,
      contains=False,
      contained_by=False,
      partial_overlap=False,
      ragged_rank=None,
  ):
      # Assemble expected value.
      # pylint: disable=g-complex-comprehension
      expected = [
          [
              [
                  (b, s, t) in expected_overlap_pairs
                  for t in range(len(target_limit[b]))
              ]
              for s in range(len(source_limit[b]))
          ]
          for b in range(self.BATCH_SIZE)
      ]
  
      source_start = ragged_factory_ops.constant(
          source_start, ragged_rank=ragged_rank
      )
      source_limit = ragged_factory_ops.constant(
          source_limit, ragged_rank=ragged_rank
      )
      target_start = ragged_factory_ops.constant(
          target_start, ragged_rank=ragged_rank
      )
      target_limit = ragged_factory_ops.constant(
          target_limit, ragged_rank=ragged_rank
      )
      overlaps = pointer_ops.span_overlaps(
          source_start,
          source_limit,
          target_start,
          target_limit,
          contains,
          contained_by,
          partial_overlap,
      )
      self.assertAllEqual(overlaps, expected)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import test
  from tensorflow_text.python.ops import pointer_ops
label_desc: Use image node_id 2 for calling the SpanOverlapsOpTest obj's underlying member method code with example usage: obj.test2DSpanOverlaps(name, source_start, source_limit, target_start, target_limit, expected_overlap_pairs, contains, contained_by, partial_overlap, ragged_rank) without return types