def METHOD_NAME(
    tmpdir,
    publisher_ocean,
    publisher_wallet,
    basic_asset,
):
    """Convert tmpdir: py._path.local.LocalPath to str, satisfy enforce-typing."""
    data_provider = DataServiceProvider
    data_nft, datatoken, ddo = basic_asset
    access_service = get_first_service_by_type(ddo, ServiceTypes.ASSET_ACCESS)
    datatoken.mint(
        publisher_wallet.address,
        to_wei(50),
        {"from": publisher_wallet},
    )
    initialize_response = data_provider.initialize(
        did=ddo.did,
        service=access_service,
        consumer_address=publisher_wallet.address,
    )
    provider_fees = initialize_response.json()["providerFee"]
    consume_market_fees = TokenFeeInfo(
        address=publisher_wallet.address,
        token=datatoken.address,
    )
    receipt = datatoken.start_order(
        consumer=publisher_wallet.address,
        service_index=ddo.get_index_of_service(access_service),
        provider_fees=provider_fees,
        consume_market_fees=consume_market_fees,
        tx_dict={"from": publisher_wallet},
    )
    orders = publisher_ocean.get_user_orders(
        publisher_wallet.address, datatoken.address
    )
    assert datatoken.address in [order.address for order in orders]
    assert receipt.transactionHash.hex() in [
        order.transactionHash.hex() for order in orders
    ]
    written_path = download_asset_files(
        ddo,
        access_service,
        publisher_wallet,
        str(tmpdir),
        receipt.transactionHash.hex(),
    )
    assert os.path.exists(written_path)
    # index not found, even though tx_id exists
    with pytest.raises(AssertionError):
        download_asset_files(
            ddo,
            ddo.services[0],
            publisher_wallet,
            str(tmpdir),
            receipt.transactionHash.hex(),
            index=4,
        )