code: def label_data(data, start, l, _type, task=None):
      """label_data"""
      for i in range(start, start + l):
          suffix = "B-" if i == start else "I-"
          label = "{}{}".format(suffix, _type)
          data[i] = label
          # if task == "trigger" and label not in trigger_dict.keys():
          #     trigger_dict[label] = len(trigger_dict) - 1
          # if task == "role" and label not in role_dict.keys():
          #     role_dict[label] = len(role_dict)
      return data
  
file_path: DeepKE/example/ee/standard/data/ACE/preprocess/preprocessing/process_bertcrf.py
imports: import argparse
  import json
  from collections import Counter, defaultdict
  import os, sys
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: label_data(data, start, l, _type, task) and returns: data