class_docstr: Crop all images
class_docstr_tok: ["Crop","all","images"]
code: def __call__(self, records):  # tuple
      images = records["image"]
      images = images[:, :, ::-1, :]
      images = images[:, :, self.crop_range[0] : self.crop_range[1]]
      records["image"] = images
  
      if "kps2d" in records.keys():
          kps2d = records["kps2d"]
  
          width, height = images.shape[2], images.shape[1]
          kps2d = np.array(kps2d)
          kps2d[:, :, 0] = kps2d[:, :, 0] - self.crop_range[0]
  
          for pair in self.flip_pairs:
              kps2d[:, pair[0], :], kps2d[:, pair[1], :] = (
                  kps2d[:, pair[1], :],
                  kps2d[:, pair[0], :].copy(),
              )
  
          records["kps2d"] = kps2d
  
      return records
  
imports: from __future__ import absolute_import
  import cv2
  import numpy
  import math
  import copy
  import random
  import uuid
  from numbers import Number, Integral
  from ...modeling.keypoint_utils import get_affine_mat_kernel, warp_affine_joints, get_affine_transform, affine_transform, get_warp_matrix
  from ppdet.core.workspace import serializable
  from ppdet.utils.logger import setup_logger
  import matplotlib.pyplot
  from PIL import Image, ImageDraw
  from mpl_toolkits.mplot3d import Axes3D
label_desc: Use image node_id 2 for calling the CropAndFlipImages obj's underlying member method code with example usage: obj.__call__(records) and returns: records