<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_barset( cls, barset, name=None, delay=None, use_wrapper=True, wrapper=None):
 """ Copy a BarSet's frames to create a new FrameSet. Arguments: barset : An existing BarSet object to copy frames from. name : A name for the new FrameSet. delay : Delay for the animation. use_wrapper : Whether to use the old barset's wrapper in the frames. wrapper : A new wrapper pair to use for each frame. This overrides the `use_wrapper` option. """

        if wrapper:
            data = tuple(barset.wrap_str(s, wrapper=wrapper) for s in barset)
        elif use_wrapper:
            data = tuple(barset.wrap_str(s) for s in barset)
        else:
            data = barset.data
        return cls(
            data,
            name=name,
            delay=delay
        )