code: def extract_image_features(image_dir, out_dir):
      extract_bbox_feats(
          os.path.join(image_dir, "objects"),
          os.path.join(out_dir, "objects"),
      )
  
      extract_spatial_feats(
          os.path.join(image_dir, "spatial"),
          os.path.join(out_dir, "spatial"),
      )
  
file_path: mmf/tools/scripts/gqa/convert_gqa_to_vqa.py
imports: import argparse
  import json
  import os
  import re
  from collections import Counter
  import h5py
  import numpy
  import tqdm
  from mmf.utils.process_answers import preprocess_answer
  from mmf.utils.text_processing import text_tokenize
label_desc: Use image node_id 6 for calling a global function with example usage: extract_image_features(image_dir, out_dir) without return types