def METHOD_NAME(lender, borrower, liquidator, loan_token_sent, loanToken, underlyingToken, collateralToken, sovryn, WRBTC, checkTinyPosition):
    underlyingToken.approve(loanToken.address, 1e40)
    if (WRBTC == underlyingToken):
        loanToken.mintWithBTC(lender, {'value': 1e21})
        value = loan_token_sent
    else:
        loanToken.mint(lender, 1e21)
        multiplier = 10**3 if checkTinyPosition else 1
        underlyingToken.mint(borrower, loan_token_sent * multiplier)
        underlyingToken.mint(liquidator, loan_token_sent * multiplier)
        underlyingToken.approve(loanToken.address, loan_token_sent * multiplier, {'from': borrower})
        underlyingToken.approve(sovryn.address, loan_token_sent * multiplier, {'from': liquidator})
        value = 0
    tx = loanToken.marginTrade(
        "0",  # loanId  (0 for new loans)
        2e18,  # leverageAmount
        loan_token_sent,  # loanTokenSent
        0,  # no collateral token sent
        collateralToken.address,  # collateralTokenAddress
        borrower,  # trader,
        b'',  # loanDataBytes (only required with ether)
        {'from': borrower, 'value': value}
    )
    return tx.events['Trade']['loanId']