code: def get_metas_from_txt_style_ann_file(ann_file):
      with open(ann_file) as f:
          lines = f.readlines()
      i = 0
      data_infos = []
      while i < len(lines):
          filename = lines[i].rstrip()
          data_infos.append(dict(filename=filename))
          skip_lines = int(lines[i + 2]) + 3
          i += skip_lines
      return data_infos
  
file_path: mmdetection/tools/misc/get_image_metas.py
imports: import argparse
  import csv
  import os.path
  from multiprocessing import Pool
  import mmcv
  from mmengine.config import Config
  from mmengine.fileio import dump, get
label_desc: Use image node_id 3 for calling a global function with example usage: get_metas_from_txt_style_ann_file(ann_file) and returns: data_infos