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

def encode_request(request_line, **headers):
    '''Creates the data for a SSDP request.

    Args:
        request_line (string): The request line for the request (e.g.
            ``"M-SEARCH * HTTP/1.1"``).
        headers (dict of string -> string): Dictionary of header name - header
            value pairs to present in the request.

    Returns:
        bytes: The encoded request.
    '''
    lines = [request_line]
    lines.extend(['%s: %s' % kv for kv in headers.items()])
    return ('\r\n'.join(lines) + '\r\n\r\n').encode('utf-8')