def convertToInt32(_bytes: list) ->list:
    """
    Convert a list of Uint8 to Int32
    Ported from javascript

    :param _bytes: a bytearray
    """
    result = []
    i = 0
    while i < len(_bytes):
        result.append(_bytes[i] << 24 | _bytes[i + 1] << 16 | _bytes[i + 2] <<
            8 | _bytes[i + 3])
        i += 4
    return result
