code: def test_equality(self):
      span_field1 = SpanField(2, 3, self.text)
      span_field2 = SpanField(2, 3, self.text)
      span_field3 = SpanField(
          2,
          3,
          TextField(
              [Token(t) for t in ["not", "the", "same", "tokens"]],
              self.indexers,
          ),
      )
  
      assert span_field1 == (2, 3)
      assert span_field1 == span_field1
      assert span_field1 == span_field2
      assert span_field1 != span_field3
      assert span_field2 != span_field3
  
file_path: allennlp/tests/data/fields/span_field_test.py
imports: import numpy
  import pytest
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import Token
  from allennlp.data.fields import TextField, SpanField
  from allennlp.data.token_indexers import SingleIdTokenIndexer
label_desc: Use image node_id 8 for calling the TestSpanField obj's underlying member method code with example usage: obj.test_equality() without return types