code: def split_train_val_list(full_list, val_ratio):
      """Split list by val_ratio.
  
      Args:
          full_list (list): List to be split
          val_ratio (float): Split ratio for val set
  
      return:
          list(list, list): Train_list and val_list
      """
  
      n_total = len(full_list)
      offset = int(n_total * val_ratio)
      if n_total == 0 or offset < 1:
          return [], full_list
      val_list = full_list[:offset]
      train_list = full_list[offset:]
      return [train_list, val_list]
  
file_path: mmocr/tools/dataset_converters/textdet/ilst_converter.py
imports: import argparse
  import os
  import os.path
  import xml.etree.ElementTree
  import mmcv
  import mmengine
  from mmocr.utils import dump_ocr_data
label_desc: Use image node_id 5 for calling a global function with example usage: split_train_val_list(full_list, val_ratio) and returns: list, list,  full_list