docstr: Apply a collection of explicit affine transforms to an input image,
  and to a target image if necessary
  
  Arguments
  ---------
  transforms : list or tuple
      each element in the list/tuple should be an affine transform.
      currently supported transforms:
          - Rotate()
          - Translate()
          - Shear()
          - Zoom()
  
  interp : string in {'bilinear', 'nearest'} or list of strings
      type of interpolation to use. You can provide a different
      type of interpolation for each input, e.g. if you have two
      inputs then you can say `interp=['bilinear','nearest']
docstr_tok: ["Apply","a","collection","of","explicit","affine","transforms","to","an","input","image",",","and","to","a","target","image","if","necessary","Arguments","--","--","--","--","-","transforms",":","list","or","tuple","each","element","in","the","list\/tuple","should","be","an","affine","transform",".","currently","supported","transforms",":","-","Rotate","(",")","-","Translate","(",")","-","Shear","(",")","-","Zoom","(",")","interp",":","string","in","{","'bilinear","'",",","'nearest","'","}","or","list","of","strings","type","of","interpolation","to","use",".","You","can","provide","a","different","type","of","interpolation","for","each","input",",","e.g",".","if","you","have","two","inputs","then","you","can","say","`","interp=","[","'bilinear","'",",","'nearest","'","]"]
code: def __init__(self, transforms, interp="bilinear"):
      """
      Apply a collection of explicit affine transforms to an input image,
      and to a target image if necessary
  
      Arguments
      ---------
      transforms : list or tuple
          each element in the list/tuple should be an affine transform.
          currently supported transforms:
              - Rotate()
              - Translate()
              - Shear()
              - Zoom()
  
      interp : string in {'bilinear', 'nearest'} or list of strings
          type of interpolation to use. You can provide a different
          type of interpolation for each input, e.g. if you have two
          inputs then you can say `interp=['bilinear','nearest']
  
      """
      self.transforms = transforms
      self.interp = interp
      # set transforms to lazy so they only return the tform matrix
      for t in self.transforms:
          t.lazy = True
  
imports: import math
  import random
  import torch
  from ..utils import th_affine2d, th_random_choice
label_desc: Use image node_id 1 to create a new AffineCompose object  with example: obj = AffineCompose(transforms, interp)