def METHOD_NAME(self, contract, name, args, sender_key, contract_addr=None, wait=False,
                           check_status=False, storage_limit=0):
    # If contract address is empty, call the constructor.
    if contract_addr:
        func = getattr(contract.functions, name)
    else:
        func = getattr(contract, name)
    attributes = {
        'nonce': self.get_nonce(priv_to_addr(sender_key)),
        ** SmartContractBenchBase.REQUEST_BASE
    }
    if contract_addr:
        attributes['receiver'] = decode_hex(contract_addr)
        attributes['to'] = contract_addr
    else:
        attributes['receiver'] = b''
    tx_data = func(*args).buildTransaction(attributes)
    tx_data['data'] = decode_hex(tx_data['data'])
    tx_data['pri_key'] = sender_key
    tx_data['gas_price'] = tx_data['gasPrice']
    tx_data['storage_limit'] = storage_limit
    tx_data.pop('gasPrice', None)
    tx_data.pop('chainId', None)
    tx_data.pop('to', None)
    transaction = create_transaction(**tx_data)
    self._send_transaction(transaction, wait, check_status)
    return transaction