code: def crop_func_help(
      image, layout, crop_y=0.2, crop_x=0.3, crop_h=220, crop_w=224
  ):
      if layout == "FHWC":
          assert len(image.shape) == 4
          H = image.shape[1]
          W = image.shape[2]
      elif layout == "HWC":
          assert len(image.shape) == 3
          H = image.shape[0]
          W = image.shape[1]
  
      assert H >= crop_h
      assert W >= crop_w
  
      start_y = int(
          np.float32(crop_y) * np.float32(H - crop_h) + np.float32(0.5)
      )
      end_y = start_y + crop_h
      start_x = int(
          np.float32(crop_x) * np.float32(W - crop_w) + np.float32(0.5)
      )
      end_x = start_x + crop_w
  
      if layout == "FHWC":
          return image[:, start_y:end_y, start_x:end_x, :]
      elif layout == "HWC":
          return image[start_y:end_y, start_x:end_x, :]
      else:
          assert False
  
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.types
  import numpy
  import os
  from test_utils import compare_pipelines
  from test_utils import RandomDataIterator
  import cv2
  import glob
label_desc: Use image node_id 1 for calling a global function with example usage: crop_func_help(image, layout, crop_y, crop_x, crop_h, crop_w) and returns: image, image