code: def rate_to_p(self, rate):
      p = rate + (1 - self.decay)  # Avoid to have all zero.
      p = p / p.max()
      p[p < self.th] = 0
      return p
  
imports: import random
  from collections import namedtuple
  import numpy
  from PIL import Image, ImageOps, ImageEnhance, ImageFilter
label_desc: Use image node_id 2 for calling the CTAugment obj's underlying member method code with example usage: obj.rate_to_p(rate) and returns: p