code: def test_AddSum(self):
      # test data with two type entities
      test_data = {
          "x": "Titanic Brilliant and moving performances "
          "by Tom Courtenay and Peter Finch",
          "y": "negative",
      }
      test_sample = SASample(test_data)
      for entity_type in ["person", "movie"]:
          test_trans = AddSum(entity_type=entity_type)
          self.assertEqual(len(test_trans.transform(test_sample)), 1)
  
      # test data with no entity
      test_data = {
          "x": "Brilliant and moving performances by  and ",
          "y": "positive",
      }
      test_sample = SASample(test_data)
      self.assertEqual([], test_trans.transform(test_sample))
  
      # test data with entity at the end of sentence
      test_data = {
          "x": "Brilliant and moving performances by Peter Finch",
          "y": "positive",
      }
      test_sample = SASample(test_data)
      test_trans = AddSum(entity_type="person")
      trans_samples = test_trans.transform(test_sample)
      self.assertTrue(
          len(trans_samples[0].get_words("x"))
          > len(test_sample.get_words("x"))
      )
      for mask_value in trans_samples[0].get_mask("x")[
          len(test_sample.get_words("x")) :
      ]:
          self.assertEqual(mask_value, 2)
  
      # test data with entity at the beginning of sentence
      test_data = {
          "x": "Peter Finch Brilliant and moving performances by",
          "y": "positive",
      }
      test_sample = SASample(test_data)
      test_trans = AddSum(entity_type="person")
      trans_samples = test_trans.transform(test_sample)
      self.assertTrue(
          len(trans_samples[0].get_words("x"))
          > len(test_sample.get_words("x"))
      )
      for mask_value in trans_samples[0].get_mask("x")[2:3]:
          self.assertEqual(mask_value, 2)
  
imports: import unittest
  from textflint.input.component.sample.sa_sample import SASample
  from textflint.generation.transformation.SA.add_sum import AddSum
label_desc: Use image node_id 3 for calling the TestAddSum obj's underlying member method code with example usage: obj.test_AddSum() without return types