class_docstr: Do transformation on input data with corresponding pre-processing and augmentation operations.
  The shape of input data to all operations is [height, width, channels].
  
  Args:
      transforms (list): A list contains data pre-processing or augmentation.
      to_rgb (bool, optional): If converting image to RGB color space. Default: True.
  
  Raises:
      TypeError: When 'transforms' is not a list.
      ValueError: when the length of 'transforms' is less than 1.
docstr: Args:
      im (str|np.ndarray): It is either image path or image object.
      label (str|np.ndarray): It is either label path or label ndarray.
  
  Returns:
      (tuple). A tuple including image, image info, and label after transformation.
docstr_tok: ["Args",":","im","(","str|np.ndarray",")",":","It","is","either","image","path","or","image","object",".","label","(","str|np.ndarray",")",":","It","is","either","label","path","or","label","ndarray",".","Returns",":","(","tuple",")",".","A","tuple","including","image",",","image","info",",","and","label","after","transformation","."]
code: def __call__(
      self,
      im: Union[np.ndarray, str],
      label: Union[np.ndarray, str] = None,
  ) -> Tuple:
      """
      Args:
          im (str|np.ndarray): It is either image path or image object.
          label (str|np.ndarray): It is either label path or label ndarray.
  
      Returns:
          (tuple). A tuple including image, image info, and label after transformation.
      """
      if isinstance(im, str):
          im = cv2.imread(im).astype("float32")
      if isinstance(label, str):
          label = np.asarray(Image.open(label))
      if im is None:
          raise ValueError("Can't read The image file {}!".format(im))
      if self.to_rgb:
          im = cv2.cvtColor(im, cv2.COLOR_BGR2RGB)
  
      for op in self.transforms:
          outputs = op(im, label)
          im = outputs[0]
          if len(outputs) == 2:
              label = outputs[1]
      im = np.transpose(im, (2, 0, 1))
      return (im, label)
  
imports: import os
  import random
  from typing import Callable, Union, List, Tuple
  import cv2
  import numpy
  from PIL import Image
  import paddlehub.vision.functional
label_desc: Use image node_id 2 for calling the Compose obj's underlying member method code with example usage: obj.__call__(im, label) and returns: im,  label