def METHOD_NAME(line):
    # parse_header works with bytes, but parse_header_parameters
    # works with strings. Call encode to convert the line to bytes.
    main_value_pair, params = parse_header(line.encode())
    return main_value_pair, {
        # parse_header will convert *some* values to string.
        # parse_header_parameters converts *all* values to string.
        # Make sure all values are converted by calling decode on
        # any remaining non-string values.
        k: v if isinstance(v, str) else v.decode()
        for k, v in params.items()
    }