    def wrapper(cls, func, height=None, catch_interrupt=False, arguments=None,
                unicode_aware=None):
        """
        Construct a new Screen for any platform.  This will initialize the
        Screen, call the specified function and then tidy up the system as
        required when the function exits.

        :param func: The function to call once the Screen has been created.
        :param height: The buffer height for this Screen (only for test purposes).
        :param catch_interrupt: Whether to catch and prevent keyboard
            interrupts.  Defaults to False to maintain backwards compatibility.
        :param arguments: Optional arguments list to pass to func (after the
            Screen object).
        :param unicode_aware: Whether the application can use unicode or not.
            If None, try to detect from the environment if UTF-8 is enabled.
        """
        screen = Screen.open(height,
                             catch_interrupt=catch_interrupt,
                             unicode_aware=unicode_aware)
        restore = True
        try:
            try:
                if arguments:
                    return func(screen, *arguments)
                else:
                    return func(screen)
            except ResizeScreenError:
                restore = False
                raise
        finally:
            screen.close(restore)
Construct a new Screen for any platform.  This will initialize the
Screen, call the specified function and then tidy up the system as
required when the function exits.

:param func: The function to call once the Screen has been created.
:param height: The buffer height for this Screen (only for test purposes).
:param catch_interrupt: Whether to catch and prevent keyboard
interrupts.  Defaults to False to maintain backwards compatibility.
:param arguments: Optional arguments list to pass to func (after the
Screen object).
:param unicode_aware: Whether the application can use unicode or not.
If None, try to detect from the environment if UTF-8 is enabled.
asciimatics/screen.py