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

def normalize_fragment(text, encoding='utf-8'):
    '''Normalize a fragment.

    Percent-encodes unacceptable characters and ensures percent-encoding is
    uppercase.
    '''
    path = percent_encode(text, encoding=encoding, encode_set=FRAGMENT_ENCODE_SET)
    return uppercase_percent_encoding(path)