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

def parse_media_type(media_type):
    '''Returns type, subtype, parameter tuple from an http media_type.
    Can be applied to the 'Accept' or 'Content-Type' http header fields.
    '''
    media_type, sep, parameter = str(media_type).partition(';')
    media_type, sep, subtype = media_type.partition('/')
    return tuple(x.strip() or None for x in (media_type, subtype, parameter))