def __init__(self, *animations, time=None, group=False, time_wait=None, **kwargs):
     merge_config_kwargs(self, kwargs)
     while isinstance(animations[-1], (int, float, bool)):
         if isinstance(animations[-1], bool):
             if int(animations[-1]) == 1:
                 group = True
             animations = animations[:-1]
         elif isinstance(animations[-1], (int, float)):
             if animations[-1] > 0:
                 time = animations[-1]
             elif animations[-1] < 0:
                 time_wait = -animations[-1]
             animations = animations[:-1]
     if group:
         animations = [AnimationGroup(*animations, **kwargs)]
     anims = AGroup(*animations)
     if time is not None:
         self.time=time
     if self.delay:
         anims.add_to_back(Freeze(self.time))
     else:
         anims.add(Freeze(self.time))
     if time_wait is not None:
         anims.add(Freeze(time_wait))
     super().__init__(*anims, **kwargs)
    def __init__(self, mobjs1, mobjs2, paths=None, pre=None, post=None, group=True, run_time=1, transpose=1, **kwargs):
        animations = AGroup()
        if group:
            lag_ratio = 0
        else:
            lag_ratio = 1
        if paths is None:
            paths = [None]*min(len(mobjs1), len(mobjs2))
        if transpose:
            #[a, b, c], [x, y, z]
            mobjects = list(map(list, zip(mobjs1, mobjs2, paths)))
            #[a, x], [b, y], [c, z]
        [animations.add(self.func(each[0], each[1], each[2], **kwargs))
         for each in mobjects]
        if pre is not None:
            animations.add_to_back(*pre)
        if post is not None:
            animations.add(*post)

        super().__init__(*animations, lag_ratio=lag_ratio, run_time=run_time, **kwargs)
 def __init__(self, mobject, color=YELLOW, width=10, opacity=None, scale_factor=1, run_time=1, highlight=1, func=None, rate_func=linear, pause_ratio=4./5, f_color=None, f_width=None, f_opacity=None, lag_ratio=1, copy=False, fadeout=None,offset=4, ratio=[0.95, 0.05], name="mobject", **kwargs):
     #for each in ["zrate_func", "scale_factor", "color", "stroke_opacity", "width"]:
     #    try:
     #        if locals()[each]:
     #            kwargs[each] = locals()[each]
     #    except:
     #        pass
     #kwargs = merge_config_kwargs(self, kwargs,self.CONFIG)
     if copy:
         mobject=mobject.copy()
     if isinstance(color, (int, float)):
         if color < 0:
             run_time = -color
             color = None
     animations = AGroup()
     if f_color is not None or f_width is not None or f_opacity is not None:
         animations.add(
             ApplyMethod(mobject.set_stroke, f_color,f_width, f_opacity,  rate_func=funz(step,0.05),run_time=run_time*ratio[1]))
             
         run_time = run_time*ratio[0]
     elif (copy and fadeout is None) or fadeout:
         animations.add(FadeOut(mobject,run_time=0.001))
     if highlight:
         kws=dict()
         if color is not None:
             kws['color']=color
         if width is not None:
             kws['width']=width
         if opacity is not None:
             kws['opacity']=opacity
         animations.add_to_back(Highlight(
                 mobject,scale_factor=scale_factor, run_time=run_time,**kws))
     else:
         animations.add_to_back(
             ApplyMethod(mobject.set_stroke, color, width, opacity, rate_func=funz(linear_pulse,0.05,0.9), run_time=run_time))
             #Transform(mobject,mobject.copy().set_stroke(color, width, opacity), rate_func=funz(linear_pulse,0.05,0.9), run_time=run_time))
             #ShowCreation(mobject.copy().set_stroke(color, width, opacity), rate_func=funz(linear_pulse,0.05,0.9), run_time=run_time))
     super().__init__(*animations, **kwargs)