code: def apply_to_mask(func, clip, *args, **kwargs):
      """Applies the same function ``func`` to the mask of the clip created with
      ``func``.
      """
      new_clip = func(clip, *args, **kwargs)
      if getattr(new_clip, "mask", None):
          new_clip.mask = func(new_clip.mask, *args, **kwargs)
      return new_clip
  
file_path: moviepy/moviepy/decorators.py
imports: import inspect
  import os
  import decorator
  from moviepy.tools import convert_to_seconds
label_desc: Use image node_id 3 for calling a global function with example usage: apply_to_mask(func, clip) and returns: new_clip