Computes the asset ID and asset quantity of every output in the transaction.

        :param CTransaction transaction: The transaction to color.
        :return: A list containing all the colored outputs of the transaction.
        :rtype: Future[list[TransactionOutput]]

def color_transaction(self, transaction):
        """
        Computes the asset ID and asset quantity of every output in the transaction.

        :param CTransaction transaction: The transaction to color.
        :return: A list containing all the colored outputs of the transaction.
        :rtype: Future[list[TransactionOutput]]
        """
        # If the transaction is a coinbase transaction, the marker output is always invalid
        if not transaction.is_coinbase():
            for i, output in enumerate(transaction.vout):
                # Parse the OP_RETURN script
                marker_output_payload = MarkerOutput.parse_script(output.scriptPubKey)

                if marker_output_payload is not None:
                    # Deserialize the payload as a marker output
                    marker_output = MarkerOutput.deserialize_payload(marker_output_payload)

                    if marker_output is not None:
                        # Fetch the colored outputs for previous transactions
                        inputs = []
                        for input in transaction.vin:
                            inputs.append((yield from asyncio.async(
                                self.get_output(input.prevout.hash, input.prevout.n), loop=self._loop)))

                        asset_ids = self._compute_asset_ids(
                            inputs,
                            i,
                            transaction.vout,
                            marker_output.asset_quantities)

                        if asset_ids is not None:
                            return asset_ids

        # If no valid marker output was found in the transaction, all outputs are considered uncolored
        return [
            TransactionOutput(output.nValue, output.scriptPubKey, None, 0, OutputType.uncolored)
            for output in transaction.vout]