code: def sel2record(self, pred, text, tokens):
      # Parsing generated SEL to String-level Record
      # 将生成的结构表达式解析成 String 级别的 Record
      well_formed_list, counter = self._predict_parser.decode(
          gold_list=[],
          pred_list=[pred],
          text_list=[text],
      )
  
      # Convert String-level Record to Entity/Relation/Event
      # 将抽取的 Spot-Asoc Record 结构
      # 根据不同的 Schema 转换成 Entity/Relation/Event 结果
      pred_records = proprocessing_graph_record(
          well_formed_list[0], self._schema_dict
      )
  
      pred = defaultdict(dict)
      # Mapping String-level record to Offset-level record
      # 将 String 级别的 Record 回标成 Offset 级别的 Record
      for task in task_record_map:
          record_map = task_record_map[task](
              map_config=self._map_config,
          )
  
          pred[task]["offset"] = record_map.to_offset(
              instance=pred_records.get(task, []),
              tokens=tokens,
          )
  
          pred[task]["string"] = record_map.to_string(
              pred_records.get(task, []),
          )
      return pred
  
file_path: DeepKE/src/deepke/name_entity_re/cross/sel2record/sel2record.py
imports: from collections import defaultdict, OrderedDict
  import os
  from ..extraction.record_schema import RecordSchema
  from ..extraction.predict_parser import get_predict_parser
  from ..sel2record.record import EntityRecord, MapConfig, RelationRecord, EventRecord
  import logging
label_desc: Use image node_id 3 for calling the SEL2Record obj's underlying member method code with example usage: obj.sel2record(pred, text, tokens) and returns: pred