class_docstr: Record for converting generated string to information record
  <type, arg1_type, arg1_span, arg2_type, arg2_span>
class_docstr_tok: ["Record","for","converting","generated","string","to","information","record","<","type",",","arg1_type",",","arg1_span",",","arg2_type",",","arg2_span",">"]
docstr: Find Role's offset using first matched in the sentence.
  :param instance:
  :return:
docstr_tok: ["Find","Role","'s","offset","using","first","matched","in","the","sentence",".",":","param","instance",":",":","return",":"]
code: def record_to_offset_first_role(self, instance, token_list):
      """
      Find Role's offset using first matched in the sentence.
      :param instance:
      :return:
      """
      relation_list = list()
  
      for record in instance:
          relation_type = record["type"]
  
          if len(record["roles"]) < 2:
              continue
  
          relation = [relation_type]
          for role_type, text_str in record["roles"][:2]:
              matched_list = match_sublist(
                  token_list, self.span_to_token(text_str)
              )
              if len(matched_list) == 0:
                  logger.warning(
                      "[Cannot reconstruct]: %s %s\n"
                      % (text_str, token_list)
                  )
                  break
              relation += [role_type, get_index_tuple(matched_list[0])]
          if len(relation) != 5 or (
              self._map_config.de_duplicate
              and tuple(relation) in relation_list
          ):
              continue
          relation_list += [tuple(relation)]
  
      return relation_list
  
imports: from asyncio.log import logger
  import sys
  from typing import Tuple
  import numpy
  import logging
label_desc: Use image node_id 3 for calling the RelationRecord obj's underlying member method code with example usage: obj.record_to_offset_first_role(instance, token_list) and returns: relation_list