def METHOD_NAME(self, data, len):
    if data is None or len < 1:
        return None
    # Create byte array
    b = array.array('b', b'\x00' * 4 * len)
    offset, i = 0, 0
    while i < len:
        argb = data[i] & 0xffffffff
        rgba = (argb << 8) | (argb >> 24)
        b1 = (rgba >> 24) & 0xff
        b2 = (rgba >> 16) & 0xff
        b3 = (rgba >> 8) & 0xff
        b4 = rgba & 0xff
        struct.pack_into("=BBBB", b, offset, b1, b2, b3, b4)
        offset = offset + 4
        i = i + 1
    return b