code: def test_get_entity_location(self):
      for tup_list in [[], "", {}]:
          self.assertEqual(
              len(swap_ins._get_entity_location(tup_list)), 0
          )
  
      # test data with multiple entity
      tup_list = sa_sample.concat_token(5)
      self.assertEqual(len(swap_ins._get_entity_location(tup_list)), 2)
      self.assertEqual(
          swap_ins._get_entity_location(tup_list), [[5, 7], [8, 10]]
      )
  
      # test get_entity_location with no entities
      test_data = {
          "x": "Brilliant and moving performances by and ",
          "y": "negative",
      }
      test_sample = SASample(test_data)
      tup_list = test_sample.concat_token(5)
      self.assertEqual([], swap_ins._get_entity_location(tup_list))
  
      # test data with entity at the beginning of sentence
      test_data = {
          "x": "Peter Finch Brilliant and moving "
          "performances by and ",
          "y": "negative",
      }
      test_sample = SASample(test_data)
      tup_list = test_sample.concat_token(5)
      self.assertEqual(
          swap_ins._get_entity_location(tup_list), [[0, 2]]
      )
  
      # test data with entity at the end of sentence
      test_data = {
          "x": " Brilliant and moving performances "
          "by and Peter Finch",
          "y": "negative",
      }
      test_sample = SASample(test_data)
      tup_list = test_sample.concat_token(5)
      self.assertEqual(
          swap_ins._get_entity_location(tup_list), [[6, 8]]
      )
  
imports: import unittest
  from textflint.input.component.sample.sa_sample import SASample
  from textflint.generation.transformation.SA.swap_special_ent import SwapSpecialEnt
label_desc: Use image node_id 2 for calling the TestSwapSpecialEnt obj's underlying member method code with example usage: obj.test_get_entity_location() without return types