<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_chunk(cls, sock, chunk_type, payload=b''):
 """Write a single chunk to the connected client."""

    chunk = cls.construct_chunk(chunk_type, payload)
    sock.sendall(chunk)