<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def packints_decode(data, dtype, numbits, runlen=0, out=None):
 """Decompress byte string to array of integers. This implementation only handles itemsizes 1, 8, 16, 32, and 64 bits. Install the imagecodecs package for decoding other integer sizes. Parameters data : byte str Data to decompress. dtype : numpy.dtype or str A numpy boolean or integer type. numbits : int Number of bits per integer. runlen : int Number of consecutive integers, after which to start at next byte. Examples -------- array([0, 1, 1, 0, 0, 0, 0, 1], dtype=uint8) """

    if numbits == 1:  # bitarray
        data = numpy.frombuffer(data, '|B')
        data = numpy.unpackbits(data)
        if runlen % 8:
            data = data.reshape(-1, runlen + (8 - runlen % 8))
            data = data[:, :runlen].reshape(-1)
        return data.astype(dtype)
    if numbits in (8, 16, 32, 64):
        return numpy.frombuffer(data, dtype)
    raise NotImplementedError('unpacking %s-bit integers to %s not supported'
                              % (numbits, numpy.dtype(dtype)))