def METHOD_NAME(
    self,
    cluster: clusterlib.ClusterLib,
    payment_addrs: tp.List[clusterlib.AddressRecord],
    request: SubRequest,
) -> tp.Tuple[str, tp.List[clusterlib.UTXOData], tp.List[clusterlib.UTXOData]]:
    """Fund a Plutus script and create the necessary Tx outputs."""
    algorithm = request.param
    temp_template = f"{common.get_test_id(cluster)}_{algorithm}"
    payment_addr = payment_addrs[0]
    dst_addr = payment_addrs[1]
    amount = 2_000_000
    script_file = (
        plutus_common.SECP256K1_LOOP_ECDSA_PLUTUS_V2
        if algorithm == "ecdsa"
        else plutus_common.SECP256K1_LOOP_SCHNORR_PLUTUS_V2
    )
    script_address = cluster.g_address.gen_payment_addr(
        addr_name=temp_template, payment_script_file=script_file
    )
    execution_units = (
        plutus_common.SECP256K1_ECDSA_LOOP_COST
        if algorithm == "ecdsa"
        else plutus_common.SECP256K1_SCHNORR_LOOP_COST
    )
    redeem_cost = plutus_common.compute_cost(
        execution_cost=execution_units,
        protocol_params=cluster.g_query.get_protocol_params(),
    )
    tx_files = clusterlib.TxFiles(
        signing_key_files=[payment_addr.skey_file],
    )
    txouts = [
        clusterlib.TxOut(
            address=script_address,
            amount=amount + redeem_cost.fee + spend_raw.FEE_REDEEM_TXSIZE,
            inline_datum_file=plutus_common.DATUM_42_TYPED,
        ),
        # for collateral
        clusterlib.TxOut(address=dst_addr.address, amount=redeem_cost.collateral),
    ]
    tx_raw_output = cluster.g_transaction.send_tx(
        src_address=payment_addr.address,
        tx_name=f"{temp_template}_step1",
        txouts=txouts,
        tx_files=tx_files,
    )
    txid = cluster.g_transaction.get_txid(tx_body_file=tx_raw_output.out_file)
    script_utxos = cluster.g_query.get_utxo(txin=f"{txid}#0")
    assert script_utxos, "No script UTxO"
    collateral_utxos = cluster.g_query.get_utxo(txin=f"{txid}#1")
    assert collateral_utxos, "No collateral UTxO"
    return algorithm, script_utxos, collateral_utxos