class_docstr: crop an image from four forwards.
  
  Args:
      up_h_off (int, optional): The cut height for image from up to down. Default: 0.
      down_h_off (int, optional): The cut height for image from down to up . Default: 0.
      left_w_off (int, optional): The cut height for image from left to right. Default: 0.
      right_w_off (int, optional): The cut width for image from right to left. Default: 0.
class_docstr_tok: ["crop","an","image","from","four","forwards",".","Args",":","up_h_off","(","int",",","optional",")",":","The","cut","height","for","image","from","up","to","down",".","Default",":","0.","down_h_off","(","int",",","optional",")",":","The","cut","height","for","image","from","down","to","up",".","Default",":","0.","left_w_off","(","int",",","optional",")",":","The","cut","height","for","image","from","left","to","right",".","Default",":","0.","right_w_off","(","int",",","optional",")",":","The","cut","width","for","image","from","right","to","left",".","Default",":","0","."]
code: def __call__(
      self, im: np.ndarray, label: np.ndarray = None
  ) -> Tuple[np.ndarray]:
      if (
          self.up_h_off < 0
          or self.down_h_off < 0
          or self.left_w_off < 0
          or self.right_w_off < 0
      ):
          raise Exception(
              "up_h_off, down_h_off, left_w_off,  right_w_off must equal or greater zero"
          )
  
      if self.up_h_off > 0 and self.up_h_off < im.shape[0]:
          im = im[self.up_h_off :, :, :]
          if label is not None:
              label = label[self.up_h_off :, :]
  
      if self.down_h_off > 0 and self.down_h_off < im.shape[0]:
          im = im[: -self.down_h_off, :, :]
          if label is not None:
              label = label[: -self.down_h_off, :]
  
      if self.left_w_off > 0 and self.left_w_off < im.shape[1]:
          im = im[:, self.left_w_off :, :]
          if label is not None:
              label = label[:, self.left_w_off :]
  
      if self.right_w_off > 0 and self.right_w_off < im.shape[1]:
          im = im[:, : -self.right_w_off, :]
          if label is not None:
              label = label[:, : -self.right_w_off]
  
      if label is None:
          return (im,)
      else:
          return (im, label)
  
file_path: PaddleHub/modules/image/semantic_segmentation/bisenet_lane_segmentation/processor.py
imports: import base64
  import collections.abc
  from itertools import combinations
  from typing import Union, List, Tuple, Callable
  import numpy
  import cv2
  import paddle
  import paddle.nn.functional
label_desc: Use image node_id 2 for calling the Crop obj's underlying member method code with example usage: obj.__call__(im, label) and returns: im, im,  label