<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def raise_if_not_match(cls, action: str,
                           expected_code: Union[int, Sequence[int]],
                           reply: Reply):
        '''Raise FTPServerError if not expected reply code.

        Args:
            action: Label to use in the exception message.
            expected_code: Expected 3 digit code.
            reply: Reply from the server.
        '''
        if isinstance(expected_code, int):
            expected_codes = (expected_code,)
        else:
            expected_codes = expected_code

        if reply.code not in expected_codes:
            raise FTPServerError(
                'Failed action {action}: {reply_code} {reply_text}'
                .format(action=action, reply_code=reply.code,
                        reply_text=ascii(reply.text)
                        ),
                reply.code
                )