code: def get_image_metas(data_info, img_prefix):
      filename = data_info.get("filename", None)
      if filename is not None:
          if img_prefix is not None:
              filename = osp.join(img_prefix, filename)
          img_bytes = get(filename)
          img = mmcv.imfrombytes(img_bytes, flag="color")
          shape = img.shape
          meta = dict(filename=filename, ori_shape=shape)
      else:
          raise NotImplementedError("Missing `filename` in data_info")
      return meta
  
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 4 for calling a global function with example usage: get_image_metas(data_info, img_prefix) and returns: meta