def METHOD_NAME(self, p, pay):
    """
    Called implicitly before a packet is sent to compute and
     place PIM checksum.
    Parameters:
      self    The instantiation of an PIMv2Hdr class
      p       The PIMv2Hdr message in hex in network byte order
      pay     Additional payload for the PIMv2Hdr message
    """
    p += pay
    if self.chksum is None:
        ck = checksum(p)
        p = p[:2] + struct.pack("!H", ck) + p[4:]
    return p