class_docstr: Compose multiple transforms sequentially.
  
  And record "img" field of all results in one list.
code: def __call__(self, data):
      self.ptransforms = [
          self.transforms[i] for i in range(len(self.transforms) - 1)
      ]
      for t in self.ptransforms:
          data = t(data)
          # Keep the same meta_keys in the PackTextDetInputs
          # or PackTextRecogInputs
          self.transforms[-1].meta_keys = [key for key in data]
          data_sample = self.transforms[-1](data)
          if data is None:
              return None
          if "img" in data:
              self.intermediate_imgs.append(
                  {
                      "name": t.__class__.__name__,
                      "dataset_sample": data_sample["data_samples"],
                  }
              )
      return data
  
imports: import argparse
  import os.path
  import sys
  from typing import Optional, Tuple
  import cv2
  import mmcv
  import numpy
  from mmengine.config import Config, DictAction
  from mmengine.dataset import Compose
  from mmengine.registry import init_default_scope
  from mmengine.utils import ProgressBar
  from mmengine.visualization import Visualizer
  from mmocr.registry import DATASETS, VISUALIZERS
label_desc: Use image node_id 2 for calling the InspectCompose obj's underlying member method code with example usage: obj.__call__(data) and returns: data, None