Computes the asset IDs of every output in a transaction.

        :param list[TransactionOutput] inputs: The outputs referenced by the inputs of the transaction.
        :param int marker_output_index: The position of the marker output in the transaction.
        :param list[CTxOut] outputs: The outputs of the transaction.
        :param list[int] asset_quantities: The list of asset quantities of the outputs.
        :return: A list of outputs with asset ID and asset quantity information.
        :rtype: list[TransactionOutput]

def _compute_asset_ids(cls, inputs, marker_output_index, outputs, asset_quantities):
        """
        Computes the asset IDs of every output in a transaction.

        :param list[TransactionOutput] inputs: The outputs referenced by the inputs of the transaction.
        :param int marker_output_index: The position of the marker output in the transaction.
        :param list[CTxOut] outputs: The outputs of the transaction.
        :param list[int] asset_quantities: The list of asset quantities of the outputs.
        :return: A list of outputs with asset ID and asset quantity information.
        :rtype: list[TransactionOutput]
        """
        # If there are more items in the asset quantities list than outputs in the transaction (excluding the
        # marker output), the marker output is deemed invalid
        if len(asset_quantities) > len(outputs) - 1:
            return None

        # If there is no input in the transaction, the marker output is always invalid
        if len(inputs) == 0:
            return None

        result = []

        # Add the issuance outputs
        issuance_asset_id = cls.hash_script(bytes(inputs[0].script))

        for i in range(0, marker_output_index):
            value, script = outputs[i].nValue, outputs[i].scriptPubKey
            if i < len(asset_quantities) and asset_quantities[i] > 0:
                output = TransactionOutput(value, script, issuance_asset_id, asset_quantities[i], OutputType.issuance)
            else:
                output = TransactionOutput(value, script, None, 0, OutputType.issuance)

            result.append(output)

        # Add the marker output
        issuance_output = outputs[marker_output_index]
        result.append(TransactionOutput(
            issuance_output.nValue, issuance_output.scriptPubKey, None, 0, OutputType.marker_output))

        # Add the transfer outputs
        input_iterator = iter(inputs)
        input_units_left = 0
        for i in range(marker_output_index + 1, len(outputs)):
            if i <= len(asset_quantities):
                output_asset_quantity = asset_quantities[i - 1]
            else:
                output_asset_quantity = 0

            output_units_left = output_asset_quantity
            asset_id = None

            while output_units_left > 0:

                # Move to the next input if the current one is depleted
                if input_units_left == 0:
                    current_input = next(input_iterator, None)
                    if current_input is None:
                        # There are less asset units available in the input than in the outputs:
                        # the marker output is considered invalid
                        return None
                    else:
                        input_units_left = current_input.asset_quantity

                # If the current input is colored, assign its asset ID to the current output
                if current_input.asset_id is not None:
                    progress = min(input_units_left, output_units_left)
                    output_units_left -= progress
                    input_units_left -= progress

                    if asset_id is None:
                        # This is the first input to map to this output
                        asset_id = current_input.asset_id
                    elif asset_id != current_input.asset_id:
                        # Another different asset ID has already been assigned to that output:
                        # the marker output is considered invalid
                        return None

            result.append(TransactionOutput(
                outputs[i].nValue, outputs[i].scriptPubKey, asset_id, output_asset_quantity, OutputType.transfer))

        return result