code: def __call__(self):
      # make writer
      if not TEST:
          writer = datasets.ArrowWriter(
              features=self.schema, path=self.outputfile
          )
      # do file generator
      for i, (img_ids, filepaths) in enumerate(self.file_generator):
          images, sizes, scales_yx = self.preprocess(filepaths)
          output_dict = self.model(
              images,
              sizes,
              scales_yx=scales_yx,
              padding="max_detections",
              max_detections=self.config.MAX_DETECTIONS,
              pad_value=0,
              return_tensors="np",
              location="cpu",
          )
          output_dict["boxes"] = output_dict.pop("normalized_boxes")
          if not TEST:
              output_dict["img_id"] = np.array(img_ids)
              batch = self.schema.encode_batch(output_dict)
              writer.write_batch(batch)
          if TEST:
              break
          # finalizer the writer
      if not TEST:
          num_examples, num_bytes = writer.finalize()
          print(
              f"Success! You wrote {num_examples} entry(s) and {num_bytes >> 20} mb"
          )
  
file_path: transformers/examples/research_projects/visual_bert/extracting_data.py
imports: import getopt
  import json
  import os
  import sys
  from collections import OrderedDict
  import datasets
  import numpy
  import torch
  from modeling_frcnn import GeneralizedRCNN
  from processing_image import Preprocess
  from utils import Config
label_desc: Use image node_id 4 for calling the Extract obj's underlying member method code with example usage: obj.__call__() without return types