code: def __call__(self, data):
      img = data["image"]
      height, width = img.shape[0:2]
      ratio = self.max_len / (max(height, width) * 1.0)
      resize_h = int(height * ratio)
      resize_w = int(width * ratio)
      resize_img = cv2.resize(img, (resize_w, resize_h))
      if self.resize_bboxes and not self.infer_mode:
          data["bboxes"] = data["bboxes"] * ratio
      data["image"] = resize_img
      data["src_img"] = img
      data["shape"] = np.array([height, width, ratio, ratio])
      data["max_len"] = self.max_len
      return data
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import sys
  import six
  import cv2
  import numpy
label_desc: Use image node_id 2 for calling the ResizeTableImage obj's underlying member method code with example usage: obj.__call__(data) and returns: data