def METHOD_NAME():
    import flame
    from .lib import CTX
    # check if segment is selected
    if isinstance(CTX.selection[0], flame.PySegment):
        sequence = get_current_sequence(CTX.selection)
        try:
            with maintained_segment_selection(sequence) as selected:
                yield
        finally:
            # reset all selected clips
            reset_segment_selection(sequence)
            # select only original selection of segments
            for segment in selected:
                segment.selected = True