<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _mysql_aes_unpad(val):
 """Reverse padding."""

    val = _to_string(val)
    pad_value = ord(val[-1])
    return val[:-pad_value]