code: def test_span_overlap_fraction(self):
      # pylint: disable=protected-access
      utterance = self.tokenizer.tokenize(
          "what is the name in english of mersin?"
      )
      field = KnowledgeGraphField(
          self.graph,
          self.utterance,
          self.token_indexers,
          self.tokenizer,
      )
      entity = "fb:row.row.name_in_english"
      entity_text = field._entity_text_map[entity]
      feature_values = [
          field._span_overlap_fraction(
              entity, entity_text, token, i, utterance
          )
          for i, token in enumerate(utterance)
      ]
      assert feature_values == [0, 0, 0, 1, 2 / 3, 1 / 3, 0, 0, 0]
  
imports: from __future__ import division
  from __future__ import with_statement
  from __future__ import absolute_import
  from collections import defaultdict
  import pytest
  from numpy.testing import assert_almost_equal
  import torch
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data import Vocabulary
  from allennlp.data.fields import KnowledgeGraphField
  from allennlp.data.token_indexers import SingleIdTokenIndexer, TokenCharactersIndexer
  from allennlp.data.tokenizers import WordTokenizer
  from allennlp.data.tokenizers.word_splitter import SpacyWordSplitter
  from allennlp.semparse.contexts import TableQuestionKnowledgeGraph
label_desc: Use image node_id 8 for calling the KnowledgeGraphFieldTest obj's underlying member method code with example usage: obj.test_span_overlap_fraction() without return types