code: def test_insert_field_before_index(self):
      # test insert before index and mask
      ins_bef = ner_sample.insert_field_before_index("text", 0, "$$$")
      self.assertEqual(
          [
              "$$$",
              "EU",
              "rejects",
              "German",
              "call",
              "to",
              "boycott",
              "British",
              "lamb",
              ".",
          ],
          ins_bef.dump()["x"],
      )
      self.assertEqual(
          ins_bef.dump()["y"], ["O"] + ner_sample.dump()["y"]
      )
      self.assertEqual(
          [2, 0, 0, 0, 0, 0, 0, 0, 0, 0], ins_bef.text.mask
      )
  
file_path: textflint/test/input/component/sample/test_ner_sample.py
imports: import unittest
  from textflint.input.component.sample.ner_sample import *
label_desc: Use image node_id 2 for calling the TestNERSample obj's underlying member method code with example usage: obj.test_insert_field_before_index() without return types