@decorator.decorator
def add_mask_if_none(f, clip, *a, **k):
 if (clip.mask is None):
  clip = clip.add_mask()
 return f(clip, *a, **k)

@ decorator . decorator def add_mask_if_none ( f , clip , * a , ** k ) : if ( clip . mask is None ) : clip = clip . add_mask ( ) return f ( clip , * a , ** k )
add a mask to the clip if there is none .