code: def testAllSpans_OnNonEmpty_ReturnsAllSortedSpans(self):
      a10 = test_utils.DummyArtifact()
      a20 = test_utils.DummyArtifact()
      a31 = test_utils.DummyArtifact()
      a30 = test_utils.DummyArtifact()
      a71 = test_utils.DummyArtifact()
      a82 = test_utils.DummyArtifact()
  
      artifacts = [a10, a20, a31, a30, a71, a82]
  
      spans = [1, 2, 3, 3, 7, 8]
      versions = [0, 0, 1, 0, 1, 2]
      for dummy_artifact, span, version in zip(
          artifacts, spans, versions
      ):
          dummy_artifact.span = span
          dummy_artifact.version = version
  
      # Rotate the artifacts list so that it is not pre-sorted.
      for _ in range(4):
          artifacts.append(artifacts.pop(0))
  
      actual = self._all_spans(artifacts)
      self.assertEqual(actual, [a10, a20, a31, a71, a82])
  
      actual = self._all_spans(artifacts, keep_all_versions=False)
      self.assertEqual(actual, [a10, a20, a31, a71, a82])
  
      actual = self._all_spans(artifacts, keep_all_versions=True)
      self.assertEqual(actual, [a10, a20, a30, a31, a71, a82])
  
file_path: tfx/tfx/dsl/input_resolution/ops/all_spans_op_test.py
imports: import tensorflow
  from tfx.dsl.input_resolution.ops import ops
  from tfx.dsl.input_resolution.ops import test_utils
label_desc: Use image node_id 3 for calling the AllSpansOpTest obj's underlying member method code with example usage: obj.testAllSpans_OnNonEmpty_ReturnsAllSortedSpans() without return types