<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_ipx(self, length):
 """Read Internetwork Packet Exchange. Structure of IPX header [RFC 1132]: Octets Bits Name Description 0 0 ipx.cksum Checksum 2 16 ipx.len Packet Length (header includes) 4 32 ipx.count Transport Control (hop count) 5 40 ipx.type Packet Type 6 48 ipx.dst Destination Address 18 144 ipx.src Source Address """

        if length is None:
            length = len(self)

        _csum = self._read_fileng(2)
        _tlen = self._read_unpack(2)
        _ctrl = self._read_unpack(1)
        _type = self._read_unpack(1)
        _dsta = self._read_ipx_address()
        _srca = self._read_ipx_address()

        ipx = dict(
            chksum=_csum,
            len=_tlen,
            count=_ctrl,
            type=TYPE.get(_type),
            dst=_dsta,
            src=_srca,
        )

        proto = ipx['type']
        length = ipx['len'] - 30
        ipx['packet'] = self._read_packet(header=30, payload=length)

        return self._decode_next_layer(ipx, proto, length)