class_docstr: Compose preprocessing operators for obtaining prepocessed data. The shape of input image for all operations is [H, W, C], where H is the image height, W is the image width, and C is the number of image channels.
  
  Args:
      transforms(callmethod) : The method of preprocess images.
      to_rgb(bool): Whether to transform the input from BGR mode to RGB mode, default is False.
      channel_first(bool): whether to permute image from channel laste to channel first
class_docstr_tok: ["Compose","preprocessing","operators","for","obtaining","prepocessed","data",".","The","shape","of","input","image","for","all","operations","is","[","H",",","W",",","C","]",",","where","H","is","the","image","height",",","W","is","the","image","width",",","and","C","is","the","number","of","image","channels",".","Args",":","transforms","(","callmethod",")",":","The","method","of","preprocess","images",".","to_rgb","(","bool",")",":","Whether","to","transform","the","input","from","BGR","mode","to","RGB","mode",",","default","is","False",".","channel_first","(","bool",")",":","whether","to","permute","image","from","channel","laste","to","channel","first"]
code: def __init__(
      self,
      transforms: Callable,
      to_rgb: bool = False,
      channel_first: bool = True,
  ):
      if not isinstance(transforms, list):
          raise TypeError("The transforms must be a list!")
      if len(transforms) < 1:
          raise ValueError(
              "The length of transforms "
              + "must be equal or larger than 1!"
          )
      self.transforms = transforms
      self.to_rgb = to_rgb
      self.channel_first = channel_first
  
imports: import random
  from typing import Callable, Union, List, Tuple
  import cv2
  import PIL
  import numpy
  import paddlehub.vision.functional
label_desc: Use image node_id 1 to create a new Compose object  with example: obj = Compose(transforms, to_rgb, channel_first)