def _parse_ppm_segment(self, fptr):
offset = fptr.tell() - <NUM_LIT:2><EOL>read_buffer = fptr.read(<NUM_LIT:3>)<EOL>length, zppm = struct.unpack('<STR_LIT>', read_buffer)<EOL>numbytes = length - <NUM_LIT:3><EOL>read_buffer = fptr.read(numbytes)<EOL>return PPMsegment(zppm, read_buffer, length, offset)<EOL>
Parse the PPM segment.

        Parameters
        ----------
        fptr : file
            Open file object.

        Returns
        -------
        PPMSegment
            The current PPM segment.