'Apply a transformation to a part of the clip.
Returns a new clip in which the function ``fun`` (clip->clip)
has been applied to the subclip between times `ta` and `tb`
(in seconds).
Examples
>>> # The scene between times t=3s and t=6s in ``clip`` will be
>>> # be played twice slower in ``newclip``
>>> newclip = clip.subapply(lambda c:c.speedx(0.5) , 3,6)'

def subfx(self, fx, ta=0, tb=None, **kwargs):

    left = (None if (ta == 0) else self.subclip(0, ta))
    center = self.subclip(ta, tb).fx(fx, **kwargs)
    right = (None if (tb is None) else self.subclip(t_start=tb))
    clips = [c for c in [left, center, right] if (c is not None)]
    from moviepy.video.compositing.concatenate import concatenate_videoclips
    return concatenate_videoclips(clips).set_start(self.start)
