code: def get_metas_from_csv_style_ann_file(ann_file):
      data_infos = []
      cp_filename = None
      with open(ann_file, "r") as f:
          reader = csv.reader(f)
          for i, line in enumerate(reader):
              if i == 0:
                  continue
              img_id = line[0]
              filename = f"{img_id}.jpg"
              if filename != cp_filename:
                  data_infos.append(dict(filename=filename))
                  cp_filename = filename
      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 2 for calling a global function with example usage: get_metas_from_csv_style_ann_file(ann_file) and returns: data_infos