def _parse_tlm_segment(self, fptr):
offset = fptr.tell() - <NUM_LIT:2><EOL>read_buffer = fptr.read(<NUM_LIT:2>)<EOL>length, = struct.unpack('<STR_LIT>', read_buffer)<EOL>read_buffer = fptr.read(length - <NUM_LIT:2>)<EOL>ztlm, stlm = struct.unpack_from('<STR_LIT>', read_buffer)<EOL>ttlm_st = (stlm >> <NUM_LIT:4>) & <NUM_LIT><EOL>ptlm_sp = (stlm >> <NUM_LIT:6>) & <NUM_LIT><EOL>nbytes = length - <NUM_LIT:4><EOL>if ttlm_st == <NUM_LIT:0>:<EOL><INDENT>ntiles = nbytes / ((ptlm_sp + <NUM_LIT:1>) * <NUM_LIT:2>)<EOL><DEDENT>else:<EOL><INDENT>ntiles = nbytes / (ttlm_st + (ptlm_sp + <NUM_LIT:1>) * <NUM_LIT:2>)<EOL><DEDENT>if ttlm_st == <NUM_LIT:0>:<EOL><INDENT>ttlm = None<EOL>fmt = '<STR_LIT>'<EOL><DEDENT>elif ttlm_st == <NUM_LIT:1>:<EOL><INDENT>fmt = '<STR_LIT:B>'<EOL><DEDENT>elif ttlm_st == <NUM_LIT:2>:<EOL><INDENT>fmt = '<STR_LIT:H>'<EOL><DEDENT>if ptlm_sp == <NUM_LIT:0>:<EOL><INDENT>fmt += '<STR_LIT:H>'<EOL><DEDENT>else:<EOL><INDENT>fmt += '<STR_LIT:I>'<EOL><DEDENT>data = struct.unpack_from('<STR_LIT:>>' + fmt * int(ntiles), read_buffer,<EOL>offset=<NUM_LIT:2>)<EOL>if ttlm_st == <NUM_LIT:0>:<EOL><INDENT>ttlm = None<EOL>ptlm = data<EOL><DEDENT>else:<EOL><INDENT>ttlm = data[<NUM_LIT:0>::<NUM_LIT:2>]<EOL>ptlm = data[<NUM_LIT:1>::<NUM_LIT:2>]<EOL><DEDENT>return TLMsegment(ztlm, ttlm, ptlm, length, offset)<EOL>
Parse the TLM segment.

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

        Returns
        -------
        TLMSegment
            The current TLM segment.