<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _split_into_mimetype_and_priority(x):
 """Split an accept header item into mimetype and priority. ('text/*', 1.0) ('application/json', 0.5) """

    if ';' in x:
        content_type, priority = x.split(';')
        casted_priority = float(priority.split('=')[1])
    else:
        content_type, casted_priority = x, 1.0

    content_type = content_type.lstrip().rstrip()  # Replace ' text/html' to 'text/html'
    return content_type, casted_priority