docstr: Convert single sel expression to extraction records
  Args:
      sel_tree (Tree): sel tree
      text (str, optional): _description_. Defaults to None.
  Returns:
      spot_list: list of (spot_type: str, spot_span: str)
      asoc_list: list of (spot_type: str, asoc_label: str, asoc_text: str)
      record_list: list of {'asocs': list(), 'type': spot_type, 'spot': spot_text}
docstr_tok: ["Convert","single","sel","expression","to","extraction","records","Args",":","sel_tree","(","Tree",")",":","sel","tree","text","(","str",",","optional",")",":","_description_",".","Defaults","to","None",".","Returns",":","spot_list",":","list","of","(","spot_type",":","str",",","spot_span",":","str",")","asoc_list",":","list","of","(","spot_type",":","str",",","asoc_label",":","str",",","asoc_text",":","str",")","record_list",":","list","of","{","'asocs","'",":","list","(",")",",","'type","'",":","spot_type",",","'spot","'",":","spot_text","}"]
code: def get_record_list(self, sel_tree, text=None):
      """Convert single sel expression to extraction records
      Args:
          sel_tree (Tree): sel tree
          text (str, optional): _description_. Defaults to None.
      Returns:
          spot_list: list of (spot_type: str, spot_span: str)
          asoc_list: list of (spot_type: str, asoc_label: str, asoc_text: str)
          record_list: list of {'asocs': list(), 'type': spot_type, 'spot': spot_text}
      """
  
      spot_list = list()
      asoc_list = list()
      record_list = list()
  
      for spot_tree in sel_tree:
          # Drop incomplete tree
          if isinstance(spot_tree, str) or len(spot_tree) == 0:
              continue
  
          spot_type = spot_tree.label()
          spot_text = get_tree_str(spot_tree)
          spot_type, spot_text = resplit_label_span(
              spot_type, spot_text
          )
          spot_type, spot_text = rewrite_label_span(
              label=spot_type,
              span=spot_text,
              label_set=self.spot_set,
              text=text,
          )
  
          # Drop empty generated span
          if spot_text is None or spot_text == null_span:
              continue
          # Drop empty generated type
          if spot_type is None:
              continue
          # Drop invalid spot type
          if (
              self.spot_set is not None
              and spot_type not in self.spot_set
          ):
              continue
  
          record = {
              "asocs": list(),
              "type": spot_type,
              "spot": spot_text,
          }
  
          for asoc_tree in spot_tree:
              if isinstance(asoc_tree, str) or len(asoc_tree) < 1:
                  continue
  
              asoc_label = asoc_tree.label()
              asoc_text = get_tree_str(asoc_tree)
              asoc_label, asoc_text = resplit_label_span(
                  asoc_label, asoc_text
              )
              asoc_label, asoc_text = rewrite_label_span(
                  label=asoc_label,
                  span=asoc_text,
                  label_set=self.role_set,
                  text=text,
              )
  
              # Drop empty generated span
              if asoc_text is None or asoc_text == null_span:
                  continue
              # Drop empty generated type
              if asoc_label is None:
                  continue
              # Drop invalid asoc type
              if (
                  self.role_set is not None
                  and asoc_label not in self.role_set
              ):
                  continue
  
              asoc_list += [(spot_type, asoc_label, asoc_text)]
              record["asocs"] += [(asoc_label, asoc_text)]
  
          spot_list += [(spot_type, spot_text)]
          record_list += [record]
  
      return spot_list, asoc_list, record_list
  
imports: from collections import Counter
  import logging
  from nltk.tree import ParentedTree
  import re
  from typing import Tuple, List, Dict
  from ...extraction.constants import null_span, type_start, type_end, span_start
  from ...extraction.predict_parser.predict_parser import PredictParser
  from ...extraction.predict_parser.utils import fix_unk_from_text
label_desc: Use image node_id 2 for calling the SpotAsocPredictParser obj's underlying member method code with example usage: obj.get_record_list(sel_tree, text) and returns: spot_list,  asoc_list,  record_list