<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def send_pgrp(cls, sock, pgrp):
 """Send the PGRP chunk over the specified socket."""

    assert(isinstance(pgrp, IntegerForPid) and pgrp < 0)
    encoded_int = cls.encode_int(pgrp)
    cls.write_chunk(sock, ChunkType.PGRP, encoded_int)