def time_mirror(clip):
    """
    Returns a clip that plays the current clip backwards.
    The clip must have its ``duration`` attribute set.
    The same effect is applied to the clip's audio and mask if any.
    """
    return clip.time_transform(lambda t: clip.duration - t - 1, keep_duration=True)