code: def test_valid_isub():
      # Add to remove from unlocked balance
      wallet = Wallet(exchange, 10000 * USD)
      wallet.withdraw(quantity=500 * USD, reason="test")
      assert wallet.balance == 9500 * USD
      assert len(wallet.locked) == 0
  
      # Add to balance with locked path_id
      wallet = Wallet(exchange, 10000 * USD)
      wallet.deposit(
          quantity=Quantity(USD, 750, path_id=path_id), reason="test"
      )
      wallet.deposit(
          quantity=Quantity(USD, 1000, path_id=other_id), reason="test"
      )
  
      wallet.withdraw(
          quantity=Quantity(USD, 500, path_id=path_id), reason="test"
      )
      assert wallet.balance == 10000 * USD
      assert wallet.locked[path_id] == 250 * USD
  
      wallet.withdraw(
          quantity=Quantity(USD, 500, path_id=other_id), reason="test"
      )
      assert wallet.balance == 10000 * USD
      assert wallet.locked[other_id] == 500 * USD
  
file_path: tensortrade/tests/tensortrade/unit/oms/wallets/test_wallet.py
imports: import pytest
  import unittest.mock
  from decimal import Decimal
  from tensortrade.core.exceptions import InsufficientFunds, IncompatibleInstrumentOperation
  from tensortrade.oms.exchanges import Exchange
  from tensortrade.oms.wallets import Wallet
  from tensortrade.oms.instruments import USD, BTC, Quantity, ExchangePair
label_desc: Use image node_id 5 for calling a global function with example usage: test_valid_isub() without return types